Skip to content
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

error: logical_not() #21

Open
fisakhan opened this issue Oct 26, 2021 · 1 comment
Open

error: logical_not() #21

fisakhan opened this issue Oct 26, 2021 · 1 comment

Comments

@fisakhan
Copy link

I get the following error by executing "sh run_demo.sh"

Parsing the arguments...
Initnializing the KV-Net
bn_running_avg = 0
RefineNet_UNet2D: init conv2d
RefineNet_UNet2D: init conv2d
init transposed 2d
RefineNet_UNet2D: init conv2d
RefineNet_UNet2D: init conv2d
init transposed 2d
RefineNet_UNet2D: init conv2d
RefineNet_UNet2D: init conv2d
RefineNet_UNet2D: init conv2d
KV-Net initialization:
with R-net: True
refinement name: DPV
loading KV_net at ./saved_models/kvnet_scannet.tar
Done
Getting the paths for traj_0
Done
Traceback (most recent call last):
File "test_KVNet.py", line 255, in
main()
File "test_KVNet.py", line 185, in main
dat_array = [ dataset[idx] for idx in range(t_win_r * 2 + 1) ]
File "test_KVNet.py", line 185, in
dat_array = [ dataset[idx] for idx in range(t_win_r * 2 + 1) ]
File "/home/Projects/torch/neuralrgbd/code/mdataloader/scanNet.py", line 400, in getitem
dmap_mask = 1 - (proc_totensor(dmap_mask) > 0 )
File "/home/.virtualenvs/torch/lib/python3.6/site-packages/torch/_tensor.py", line 544, in rsub
return _C._VariableFunctions.rsub(self, other)
RuntimeError: Subtraction, the - operator, with a bool tensor is not supported. If you are trying to invert a mask, use the ~ or logical_not() operator instead.

@sushlokshah
Copy link

replace '1-(proc_totensor(dmap_mask) > 0 )' and '1-( proc_totensor( dmap_mask_imgsize ) >0)' from line 400 and 401 of scanNet.py with ~(proc_totensor(dmap_mask) > 0 ) and ~( proc_totensor( dmap_mask_imgsize ) >0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants