test that bias has no grads with Zeros
This commit is contained in:
parent
245563077b
commit
ec872bb579
@ -31,6 +31,8 @@ end
|
|||||||
bias = Conv((2,2), 1=>3, bias = Flux.Zeros())
|
bias = Conv((2,2), 1=>3, bias = Flux.Zeros())
|
||||||
op = bias(ip)
|
op = bias(ip)
|
||||||
@test sum(op) === 0.f0
|
@test sum(op) === 0.f0
|
||||||
|
gs = gradient(() -> sum(bias(ip)), Flux.params(bias))
|
||||||
|
@test gs[bias.bias] == nothing
|
||||||
|
|
||||||
# Train w/o bias and make sure no convergence happens
|
# Train w/o bias and make sure no convergence happens
|
||||||
# when only bias can be converged
|
# when only bias can be converged
|
||||||
|
Loading…
Reference in New Issue
Block a user