Mercurial > repos > public > sbplib_julia
diff src/LazyTensors/lazy_tensor_operations.jl @ 418:264af2bb646f feature/tensor_composition
Switch to using * instead of calling the constructor
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 16 Oct 2020 20:35:41 +0200 |
parents | 4c6604b7d990 |
children | 2958b4ebd565 |
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl Fri Oct 16 20:32:09 2020 +0200 +++ b/src/LazyTensors/lazy_tensor_operations.jl Fri Oct 16 20:35:41 2020 +0200 @@ -97,11 +97,11 @@ domain_size(tm::TensorMappingComposition) = domain_size(tm.t2) function apply(c::TensorMappingComposition{T,R,K,D}, v::AbstractArray{T,D}, I::Vararg{S,R} where S) where {T,R,K,D} - apply(c.t1, LazyTensorMappingApplication(c.t2,v), I...) + apply(c.t1, c.t2*v, I...) end function apply_transpose(c::TensorMappingComposition{T,R,K,D}, v::AbstractArray{T,R}, I::Vararg{S,D} where S) where {T,R,K,D} - apply_transpose(c.t2, LazyTensorMappingApplication(c.t1',v), I...) + apply_transpose(c.t2, c.t1'*v, I...) end Base.@propagate_inbounds Base.:∘(s::TensorMapping, t::TensorMapping) = TensorMappingComposition(s,t)