Skip to content

Commit

Permalink
Fixed the test hopefully
Browse files Browse the repository at this point in the history
  • Loading branch information
bhvieira committed Feb 11, 2020
1 parent bede06d commit b6455c6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/layers/normalisation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,11 @@ end
Δg = gswn[g]
Δv = gswn[v]
@test wnd(fake_data) d(fake_data)
@test sum(ΔW .* v ./ normv, dims = WN_dim...) Δg
if isa(WN_dim, Int)
@test sum(ΔW .* v ./ normv, dims = WN_dim) Δg
else
@test sum(ΔW .* v ./ normv, dims = WN_dim[1]) Δg
end
@test g ./ normv .* ΔW - g .* Δg .* v ./ (normv.^2) Δv
@test size(Δv) == size(ΔW)
@test isa(wnd.layer.W, Flux.WeightNormParam)
Expand Down

0 comments on commit b6455c6

Please sign in to comment.