using Flux,LinearAlgebra
function MWE()
η=0.01
model=Conv((64, 64), 1=>1, relu,stride=30)
loss(x,y) = Flux.mse(model(x),y)
dataset=[(rand(100,100,1,1),rand(2,2,1,1))]
@show model(dataset[1][1])
@show loss(dataset[1]...)
for i in 1:10
Flux.train!(loss,params(model), dataset, ADAM(η))
@show i, loss(dataset[1]...)
end
end
MWE();
model((dataset[1])[1]) = [0.0 2.86116; 0.0 0.0] (tracked)
loss(dataset[1]...) = 1.4128901344841402 (tracked)
(i, loss(dataset[1]...)) = (1, 0.37165153102154674 (tracked))
(i, loss(dataset[1]...)) = (2, 0.37165153102154674 (tracked))
(i, loss(dataset[1]...)) = (3, 0.37165153102154674 (tracked))
(i, loss(dataset[1]...)) = (4, 0.37165153102154674 (tracked))
(i, loss(dataset[1]...)) = (5, 0.37165153102154674 (tracked))
(i, loss(dataset[1]...)) = (6, 0.37165153102154674 (tracked))
(i, loss(dataset[1]...)) = (7, 0.37165153102154674 (tracked))
(i, loss(dataset[1]...)) = (8, 0.37165153102154674 (tracked))
(i, loss(dataset[1]...)) = (9, 0.37165153102154674 (tracked))
(i, loss(dataset[1]...)) = (10, 0.37165153102154674 (tracked))
For some weird reason i’m not able to fix this behavior, is there a remedy?