You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using Flux, Zygote
# Generate a rand input
x = rand(1,1) |> gpu
# Construct a neural net
m = Dense(1,1,tanh) |> gpu
# Get ∇m⋅m
function ∇m_m(x)
out, back = Zygote.pullback(m, x)
return back(out)
end
pullback(∇m_m, x)
But when I change tanh to swish, I get the following error at out, back = Zygote.pullback(m, x).
I'm running on Debian GNU/Linux 10 and I encounter the same error on both Julia 1.5.3 and 1.6.0-beta1.
The text was updated successfully, but these errors were encountered:
IsaacBreen
changed the title
Pullback within pullback throws KernelError when using swish activation function
Pullback within pullback throws CuArray only supports bits types when using swish activation function
Feb 5, 2021
IsaacBreen
changed the title
Pullback within pullback throws CuArray only supports bits types when using swish activation function
Pullback within pullback throws error when using swish activation function
Feb 5, 2021
I don't have access to the machine I originally encountered this error on, but when I run the same code on a Colab GPU instance it works fine. In three lines:
!wget -q https://julialang-s3.julialang.org/bin/linux/x64/1.6/julia-1.6.0-linux-x86_64.tar.gz
!tar zxf julia-1.6.0-linux-x86_64.tar.gz
!/content/julia-1.6.0/bin/julia -e "import Pkg; Pkg.add([\"Flux\",\"Zygote\",\"CUDA\"]); using Flux, Zygote; x = rand(1,1) |> gpu; m = Dense(1,1,tanh) |> gpu; function ∇m_m(x) ;out, back = Zygote.pullback(m, x); return back(out); end ;pullback(∇m_m, x)"
So I guess we could close this for now as long as nobody else is reporting the same issue.
This code works.
But when I change
tanh
toswish
, I get the following error atout, back = Zygote.pullback(m, x)
.I'm running on Debian GNU/Linux 10 and I encounter the same error on both Julia 1.5.3 and 1.6.0-beta1.
The text was updated successfully, but these errors were encountered: