-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fps, Trying to create tensor with negative dimension #125
Comments
Thanks for reporting. How does the |
I added: n_tries = 0
while n_tries < 3:
try:
idx = fps(pos, batch, ratio=self.ratio)
break
except Exception as e:
import pickle
pickle.dump((x, pos, batch), open(f"fps_err_{n_tries}.pkl", "wb"))
print(e)
n_tries += 1 Tensors are on the GPU. My guess is that
Yes, I am training reinforcement learning algos, so not using |
The following code works fine for me, super weird :( import pickle
from torch_cluster import fps
with open('fps_err_0.pkl', 'rb') as f:
data = pickle.load(f)
x, pos, batch = data
print(pos.shape, batch.shape)
for random_start in [True, False]:
for ratio in [0.2, 0.5, 0.8]:
for _ in range(10000):
out = fps(pos, batch, ratio, random_start)
print(out.shape, out.device) |
Yeah, it's a strange issue. Btw |
Update: I did a few runs with Interestingly, a colleague started a job on the same GPU which I was using, and I did notice CUDA out of memory errors popped up alongside this negative dimension bug. The multiple tries loop still caught the exception so the run did not crash. The 3090 being used also still had a few GB of memory available. For now though, the solution seems to be fine, so feel free to close. |
Thanks for sharing. I will do some further digging on my end as well. |
I'm training a PointNet++, based on
https://github.com/pyg-team/pytorch_geometric/blob/master/examples/pointnet2_classification.py
. I'm getting a similar error as this issue:As a temporary fix, I've added a try/except repeat around the
fps(...)
call.Environment
The text was updated successfully, but these errors were encountered: