Solved by ptrblck in post #3 
              
              
                Skimming through your examples I could only see the difference in the parameter initialization. While Keras seems to use glorot/xavier_uniform for the weights and zeros for the bias, PyTorch uses kaiming_uniform for the weights and some other uniform init for the bias source. 
Could you try to initi…