My problem still persists!
Actually the loss in keras constantly decreases to the minimum loss(about 0.2).
But in pytorch the loss starts from about 5.0 and decreases to aboout 0.8 abd stays in 0.8±0.1 forever…
I changed learning rate from 0.1 to 0.0000001 and the same results!
The model and the initializations are the same. The loss function and SGD are the same.
The number of trainable parameters are same for both keras and pytorch.
I think something really wrong with pytorch.
Any help…