You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When executing example from README, gs = gradient(x -> sum(tresnet(x)), tip); throws ERROR: DimensionMismatch("cannot broadcast array to have fewer dimensions")
minimal working example (simple Chain substituted for ResNet from README):
using Flux
using Torch
using Torch: torch
net =Chain(
Dense(10, 5, σ),
Dense(5, 2),
softmax)
tnet = net |> torch
ip =rand(Float32, 10, 1)
tip =tensor(ip, dev =0)
gs =gradient(x ->sum(tnet(x)), tip)
When executing example from README,
gs = gradient(x -> sum(tresnet(x)), tip);
throwsERROR: DimensionMismatch("cannot broadcast array to have fewer dimensions")
minimal working example (simple Chain substituted for ResNet from README):
Result:
The text was updated successfully, but these errors were encountered: