It seems, the difference is the L2 regularization, which prevents overfitting in TF implementation.
What is an easy way to add L2 regularization to PyTorch layer? or should I try other regularization techniques, like dropout?