@ptrblck I was badly expecting your reply. I looked at the number of parameters. The tensorflow model.summary() gives me the following:
Total params: 4,739,526
Trainable params: 4,735,378
Non-trainable params: 4,148
For pytorch, I use torchsummary library and get the following:
Total params: 4,735,378
Trainable params: 4,735,378
Non-trainable params: 0
So, it seems that the trainable parameters are same, but not sure how is it calculating the non-trainable params.
For tensorflow, one epoch requires 1.5 minutes where as pytorch takes almost 4.5 minutes which is a surprise for me.
I am happy to share both my torch and tensorflow/keras progam if you are happy to have a look and can indicate any issue there. It would be really a great help.
Kind Regards,
Mohaimen