On my initial post I said the code won’t work in any environment, but I just noticed that the results of this model vary from different environments. On one AWS server(with DeepLearning AMI, version 20, ubuntu 16.04), the model did give non-all-white output with batch size of 2. But the same setting just won’t work on another machine(All the difference I can tell is the Nvidia driver, one is 410.79 and another is 410.129).
Could this be a bug of pytorch?