Updated
I found that in Keras, random_normal initializer initalize the weights with Normal(0, 0.05) not Normal(0, 1). So I changed the pytorch last layer weights initialization to
nn.init.normal_(param.data, std=std)  results becomes better. I was surprised that in such a simple task, weights initialization takes huge effect. I changed the random seed and do 24 experiments, Keras is not superior to Pytorch anymore, it’s all about randomness(玄学)
Screen Shot 2020-11-17 at 1.23.55 PM1346×1728 384 KB