IsaacGS:

generated_vectors = []
for rx in x:
# stuff gets appended to generated_vectors
    x = numpy.array(generated_vectors)
    x = torch.from_numpy(x).float()
    x = x.view(-1, len(rx) * self.vector_count)
    x = Variable(x, requires_grad=True)



Here you seem to work outside the Variable interface. If generated_vectors is generated using tensors and/or numpy, then no history will be tracked. So pytorch cannot backward pass it.