Solved by KFrank in post #2 
              
              
                Hi Hamad! 
First, I think going through an exercise like this is very worthwhile. 
Taking the time to do “by hand” some of the things built in to pytorch 
is a great way to really learn what is going on and will prove valuable 
when you move on to tackling more complicated problems. 

I have not gon…