gradients test updated in cudnn

This commit is contained in:
thebhatman 2019-07-16 17:27:35 +05:30
parent d0b94b88f6
commit a128a7718d
1 changed files with 4 additions and 4 deletions

View File

@ -17,8 +17,8 @@ trainmode(f, x...) = forward(f, x...)[1]
g = gradient(()->sum(m(x)), params(m))
cg = gradient(()->sum(cm(cx)), params(cm))
@test g.grads[m.γ] cpu(cg.grads[cm.γ])
@test g.grads[m.β] cpu(cg.grads[cm.β])
@test g[m.γ] cpu(cg[cm.γ])
@test g[m.β] cpu(cg[cm.β])
end
@testset "2D Input" begin
@ -37,7 +37,7 @@ trainmode(f, x...) = forward(f, x...)[1]
g = gradient(()->sum(m(x)), params(m))
cg = gradient(()->sum(cm(cx)), params(cm))
@test g.grads[m.γ] cpu(cg.grads[cm.γ])
@test g.grads[m.β] cpu(cg.grads[cm.β])
@test g[m.γ] cpu(cg[cm.γ])
@test g[m.β] cpu(cg[cm.β])
end
end