re-establishing GPU support for char-rnn.jl
- Dominant language
- Julia
- Stars
- 934
- Forks
- 326
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I have just stumbled upon the [char-rnn.jl](https://github.com/FluxML/model-zoo/blob/master/text/char-rnn/char-rnn.jl) example in my first attempt of checking out Julia machine learning with Flux.jl.
The example works, but produces kind of garbage as a text generator. Since it seems to be on the TODO list anyways in [issue 266](https://github.com/FluxML/model-zoo/issues/266), I was wondering how difficult It'd be to re-establish the CUDA support that [was removed previously](https://github.com/FluxML/model-zoo/pull/210#issuecomment-618821549) in a [commit](https://github.com/FluxML/model-zoo/pull/210/commits/110f1ba6eed905c6706415e436a059910064a99d). This would allow (me) to play around with a more intense training of the model to see whether the generated text gains some _quality_.
I guess the error that @AdarshKumar712 [got](https://github.com/FluxML/model-zoo/pull/210#issuecomment-618821549) was
```plain
ERROR: LoadError:
Need an adjoint for constructor Flux.OneHotMatrix{CuArray{Flux.OneHotVector,1}}.
Gradient is of type CuArray{Float32,2}
```
in line
```julia
function loss(xs, ys)
l = sum(logitcrossentropy.(m.(gpu.(xs)), gpu.(ys)))
return l
end
```
Any thoughts? Would this be fixable in an easy way?
regards,
Christian
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.