Closed vitskvara closed 4 years ago
See https://github.com/aicenter/GenerativeModels.jl/issues/72
I think the issue is in the functor definition. Now we have CMeanGaussian{V,S,M}, where M is the type of mapping. But consider this:
CMeanGaussian{V,S,M}
M
julia> m = Dense(3,2) Dense(3, 2) julia> typeof(m) Dense{typeof(identity),Array{Float32,2},Array{Float32,1}} julia> m = m |> gpu Dense(3, 2) julia> typeof(m) Dense{typeof(identity),CuArray{Float32,2,Nothing},CuArray{Float32,1,Nothing}}
Clearly, the type changes when moving to the gpu. However, in the functor redefinition, the type M is static.
closed with #12
See https://github.com/aicenter/GenerativeModels.jl/issues/72
I think the issue is in the functor definition. Now we have
CMeanGaussian{V,S,M}
, whereM
is the type of mapping. But consider this:Clearly, the type changes when moving to the gpu. However, in the functor redefinition, the type
M
is static.