replaced trunc Int with div
This commit is contained in:
parent
a128a7718d
commit
b779d43aca
@ -136,7 +136,7 @@ function (BN::BatchNorm)(x)
|
|||||||
dims = length(size(x))
|
dims = length(size(x))
|
||||||
channels = size(x, dims-1)
|
channels = size(x, dims-1)
|
||||||
affine_shape = ntuple(i->i == ndims(x) - 1 ? size(x, i) : 1, ndims(x))
|
affine_shape = ntuple(i->i == ndims(x) - 1 ? size(x, i) : 1, ndims(x))
|
||||||
m = trunc(Int, prod(size(x))/channels)
|
m = div(prod(size(x)), channels)
|
||||||
γ = reshape(BN.γ, affine_shape...)
|
γ = reshape(BN.γ, affine_shape...)
|
||||||
β = reshape(BN.β, affine_shape...)
|
β = reshape(BN.β, affine_shape...)
|
||||||
if !istraining()
|
if !istraining()
|
||||||
|
Loading…
Reference in New Issue
Block a user