Thanks, I will definitely write with vectorized operations I just wanted to know why it exploded so that I don’t make that mistake in the future.
So, are you implying that torch.randn(2,5).t() is not contiguous but torch.randn(5,2) would be because of transpose()? Sorry, is there a reference on the nuances of autograd and contiguity? Also, for what its worth, I printed the value of x.is_contiguous() for the input as it went through the network and it says True for each step.