Open3D
Open3D copied to clipboard
AttributeError: 'SummaryWriter' object has no attribute 'add_3d'
when I run the examples/python/visualization/tensorboard_pytorch.py, the error showed as follow:
Traceback (most recent call last):
File "/home/johnny.pan/OPEN3D/Open3D/examples/python/visualization/tensorboard_pytorch.py", line 206, in
Hi @Nireil, Please fill out the bug reporting template with info about your system / environment (including PyTorch version). Please try with the latest development Python wheel from here: http://www.open3d.org/docs/latest/getting_started.html#development-version-pip and let us know if you still have this issue.
I had the same problem,tried pytorch 1.8.1
I had the same problem,tried pytorch 1.8.1
I have solved it! You need to add from open3d.visualization.tensorboard_plugin import summary
before from open3d.visualization.tensorboard_plugin.util import to_dict_batch
in the /examples/visualization/tensorboard_pytorch.py.
Explanation
from open3d.visualization.tensorboard_plugin import summary
This line will run the MonkeyPatching
method at below
https://github.com/isl-org/Open3D/blob/c3dfcbdc8d7cdf5603367b783b6d4a43fc934bd5/python/open3d/visualization/tensorboard_plugin/summary.py#L804-L810
It's really a kind of trick.
Be careful, most IDE will remove this line if you use some features like Auto-Import
.