Solved by kiriakospapa in post #5 
              
              
                Hey Yasar, I figured out what the problem was. It had to do about the 2nd warning at my question. I had to do torch.flatten(x_center)  in order to be a tensor of size[4] instead of [4,1]. Despite the warning, I didn’t find it very reasonable and if you or anyone else could explain why it works like …