Thanks a lot for your suggestion. I have now initialised the dropout in __init__.
In the Keras script it’s also plain numpy arrays (without any preprocessing) which I reshaped. In fact, I switched to plain numpy arrays in my Pytorch code to see if I get results similar to the Keras script. It turned out that it sort of did the job.
Surprisingly, the data in Dataset are all zeros whereas in the manual approach it is between [0.0, 0.53]. Something is definitely wrong with my Dataset.
I also changed Variable(torch.from_numpy()) to simply torch.tensor() and got consistent results, altough the time it takes for one epoch is ~ 5mins.
As a whole, with all the changes implemented and using manual approach to load the batches, I also get the trend in my results in Pytorch over two epochs (like in Keras), although it takes a bit longer. It could be though that it is the way I implement the validation at each epoch that takes quite some time. I’m also still left with this bug which I still need to find in my Dataset.