Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPU conversion #11

Closed
vitskvara opened this issue Dec 18, 2019 · 1 comment
Closed

GPU conversion #11

vitskvara opened this issue Dec 18, 2019 · 1 comment

Comments

@vitskvara
Copy link
Collaborator

vitskvara commented Dec 18, 2019

See aicenter/GenerativeModels.jl#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:

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.

@vitskvara vitskvara mentioned this issue Dec 18, 2019
@nmheim
Copy link
Member

nmheim commented Jan 9, 2020

closed with #12

@nmheim nmheim closed this as completed Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants