-
Notifications
You must be signed in to change notification settings - Fork 127
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
Update this code to the pytorch 2.0 numpy 1.24 #39
Comments
Hi ,can you send the latest version of this code? Thank you very much. |
So the code below are the change I made: mesh_pool.py: line 35 change to :mask = np.ones(mesh.edges_count, dtype=bool) mesh.py:line 91-95
|
Now maybe you should also change some other lines in mesh.py to make sure all tensors and their indexes are on the same devices. |
Here is what I do to make sure all tensors and their indexes are on the same device. add after mesh.py line 27 self.v_mask = np.ones(len(self.vs), dtype=bool)
self.v_mask = torch.from_numpy(self.v_mask).to(self.device) replace mesh.py line 368 with: # face = self.sub_mesh_index[i][face].to(face.device).long()
face = face.to(self.sub_mesh_index[i].device).long()
face = self.sub_mesh_index[i][face] |
Hi, I just update this code to pytorch 2.0 and numpy 1.24 by replace the np.bool to bool, adding device consistency for pytorch and also fix the dtype of inhomogeneous array of vei to object.
I test it and the result looks good so if anyone need help for the latest version of this code I can send a pull request
The text was updated successfully, but these errors were encountered: