I’m trying to train a model that uses a symmetric matrix – I implemented it via:
T = nn.Parameter(torch.Tensor(STATE_DIM, STATE_DIM))
self.Q = torch.mm(T, T.t())
but when trying to train, I am getting an error about needing retain_graph=True but then my loss value doesn’t decrease during optimizer steps
Is there a way to enforce symmetry in a way that doesn’t require retain_graph? if not, how do I get my loss to go down when retain_graph=True?