fix dot product for newer version of torch#25
Conversation
fix(min_norm_solvers.py): change torch.dot -> torch.mul followed by sum() for Matrix dot product fix(min_norm_solvers.py): change data[0] to data.cpu()
|
Hi, when running the code under my setting, I also got the issue "RuntimeError: 1D tensors expected, got 2D". How I solve this issue is that I flatten the original tensor gradients and make it fit into the torch.dot function. If what I am doing is correct, we are simply doing an element-wise matrix followed by sum() instead of torch.mul. Hope someone can clarify it. |
Hi, |
fix(min_norm_solvers.py): change torch.dot -> torch.mul followed by sum() for Matrix dot product
fix(min_norm_solvers.py): change data[0] to data.cpu()