@eqy, I did change it and now it works. But, I get this output which doesn’t look right
Training on cpu
Epoch: 1
	Training batch 1 Loss: 2.339761
	Training batch 2 Loss: 0.000000
	Training batch 3 Loss: 0.000000
	Training batch 4 Loss: 0.000000
	Training batch 5 Loss: 0.000000
	Training batch 6 Loss: 0.000000
	Training batch 7 Loss: 0.000000
	Training batch 8 Loss: 0.000000
	Training batch 9 Loss: 0.000000