ctallec / world-models

Reimplementation of World-Models (Ha and Schmidhuber 2018) in pytorch
MIT License
568 stars 131 forks source link

trainmdrnn running only test, the test loss decreases? #16

Closed ranahanocka closed 5 years ago

ranahanocka commented 5 years ago

I noticed a behavior which is a bit odd. If I comment out the line which runs training in trainmdrnn.py see here which means I am only running test, the test error loss is decreasing. I am confused as to how this can be, since no gradients should be updating anything during test, right?

ETA: I added this snippet of code in the data_pass

        wsum = 0
        for w in list(mdrnn.parameters()):
            wsum += torch.norm(w)
        print(wsum.item())

and it looks like the mdrnn weights indeed aren't changing during test (only during train) -- but I am still not sure how the test loss can be decreasing.

ctallec commented 5 years ago

I cannot reproduce your issue. If I comment the training part in the MDRNN file, what I get is a test loss that fluctuates around 1.39 (fluctuations come from the randomization of the test subset).