Thank You, I am just new to pytorch, and tensor flow.
I used to get few syntax errors, after rectifying them, I am getting NaNs
tensor([[-0.0967, -0.1131,  0.1547, -0.1049,  0.0389, -0.0262,  0.0479,  0.0782,
0.0131, -0.1127, -0.0521,  0.0997, -0.0067,  0.0571,  0.0448, -0.0665,
0.1008, -0.0876,  0.1350,  0.0513,  0.0555, -0.1171, -0.0818, -0.1276,
-0.0125, -0.0328,  0.0354, -0.0660, -0.1319,  0.0002,  0.0743,  0.1331,
0.0225,  0.0970],
[ 0.0827, -0.1100,  0.1147, -0.0378, -0.1213, -0.0037,  0.0196, -0.1361,
0.1561, -0.0331,  0.0005, -0.0352,  0.0591,  0.1045,  0.0053,  0.0299,
0.1678, -0.0411, -0.0481, -0.0484,  0.1273,  0.1627,  0.0127,  0.0643,
0.0254, -0.1005,  0.0228, -0.0644, -0.1644, -0.0429, -0.1133,  0.0151,
0.0835,  0.1594]])
tensor([-0.1383, -0.1448])
Iteration: 0. Loss: nan.Correct:361. total:382. Accuracy: 94.50261780104712.
/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:23: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:24: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:26: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:27: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:58: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:59: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:65: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:66: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:71: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:72: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
Iteration: 10. Loss: nan.Correct:382. total:382. Accuracy: 100.0.
Iteration: 20. Loss: nan.Correct:382. total:382. Accuracy: 100.0.
Iteration: 30. Loss: nan.Correct:382. total:382. Accuracy: 100.0.
Iteration: 40. Loss: nan.Correct:382. total:382. Accuracy: 100.0.
Iteration: 50. Loss: nan.Correct:382. total:382. Accuracy: 100.0.
Iteration: 60. Loss: nan.Correct:382. total:382. Accuracy: 100.0.
Iteration: 70. Loss: nan.Correct:382. total:382. Accuracy: 100.0.