You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original line was : y.register_hook(lambda grad,b=batch : torch.solve(grad[:,None], J[b].transpose(0,1))[0][:,0])
I changed to torch.linalg.solve, but still got error as
RuntimeError: linalg.solve: A must be batches of square matrices, but they are 65 by 1 matrices
I changed the code to the
y.register_hook(lambda grad,b=batch : torch.linalg.solve(J[b].transpose(0,1),grad[:,None])[:,0])
By this change, code works but I am not sure if operations are right ?
The text was updated successfully, but these errors were encountered:
Original line was : y.register_hook(lambda grad,b=batch : torch.solve(grad[:,None], J[b].transpose(0,1))[0][:,0])
I changed to torch.linalg.solve, but still got error as
RuntimeError: linalg.solve: A must be batches of square matrices, but they are 65 by 1 matrices
I changed the code to the
y.register_hook(lambda grad,b=batch : torch.linalg.solve(J[b].transpose(0,1),grad[:,None])[:,0])
By this change, code works but I am not sure if operations are right ?
The text was updated successfully, but these errors were encountered: