Solved by Jose_Silvestre_Rodri in post #4 
              
              
                I was able to solve it, a classmate in Udacity suggested me to do this, var.detach().numpy().item(0) for the first item, and it worked. 
Thank you so much for your help! @albanD