FluxML / Torch.jl

Sensible extensions for exposing torch in Julia.
Other
213 stars 15 forks source link

`tresnet` always return value ones(1000) #25

Closed terasakisatoshi closed 4 years ago

terasakisatoshi commented 4 years ago

Is it correct ?

julia> tresnet(tensor(rand(Float32,224,224,3,1), dev=0))
1000×1 Tensor{Float32,2}:
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 ⋮
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0

julia> tresnet(tensor(rand(Float32,224,224,3,1), dev=0))|>sum
1000.0f0

julia> tresnet(tensor(rand(Float32,224,224,3,1), dev=0))|>sum
1000.0f0

julia> tresnet(tensor(rand(Float32,224,224,3,1), dev=0))|>sum
1000.0f0

julia> tresnet(tensor(rand(Float32,224,224,3,1), dev=0))|>sum
1000.0f0

julia> tresnet(tensor(rand(Float32,224,224,3,1), dev=0))|>sum
1000.0f0

julia> tresnet(tensor(rand(Float32,224,224,3,1), dev=0))|>sum
1000.0f0
DhairyaLGandhi commented 4 years ago

Dup of #21

Seemingly related to an incorrect dimension being used in softmax.

DhairyaLGandhi commented 4 years ago

Fixed on master