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
Hi, I am trying to evaluate on tsp100 data, and have this error saying
File "/T2TCO/diffusion/pl_tsp_model.py", line 247, in test_step
g_xt = self.guided_categorical_denoise_step(points, g_xt, t1, device, edge_index, target_t=t2)
File "/T2TCO/diffusion/pl_tsp_model.py", line 91, in guided_categorical_denoise_step
assert xt.grad is not None
The function has this assert statement to assert xt has gradient, but the input g_xt is converted to long type in line 238, and long type tensor cannot have gradient. Can someone help me with this? Thanks
(g_xt > 0).long()
The text was updated successfully, but these errors were encountered:
Please kindly note that this tensor has been converted to float format in line 61 xt = xt.float(). The gradient here is estimated based on x_t. This issue is likely caused by the incorrect version of PyTorch Lightning. PyTorch Lightning itself does not support gradient computation during the testing phase. Therefore, we added two lines of code, torch.set_grad_enabled(True) and with torch.inference_mode(False):, to enable gradient computation. If you still encounter gradient computation issues, please check the version of the libraries or refer to relevant solutions for the version you are using, such as those available at Lightning-AI/pytorch-lightning#13948.
Should you have any further inquiries, please feel free to reach out. By the way, kindly mention me in the comments (@ me) so that I can promptly receive notifications and address your question.
Hi, I am trying to evaluate on tsp100 data, and have this error saying
The function has this assert statement to assert xt has gradient, but the input g_xt is converted to long type in line 238, and long type tensor cannot have gradient. Can someone help me with this? Thanks
(g_xt > 0).long()
The text was updated successfully, but these errors were encountered: