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
When I randomly generate a tensor, It's OK. But when I input a picture, it will report an error. How can I solve it?
Code:
d = 3
generate a tensor
input = torch.randn(2,2,2,2)
input a picture
input = Image.open('/data/lu/ls/data/BDDU/ShadowImages/04056725-14e1b11d-00001.png' ).convert('RGB')
input = torch.from_numpy(np.array(input)).unsqueeze(0).permute(0,3,2,1)
out = spatial_correlation_sample(input, input, kernel_size=d, patch_size=d, stride=1, padding=int(d/2))
Error:
terminate called after throwing an instance of 'c10::Error'
what(): "correlation_forward_cpp" not implemented for 'Byte' (operator() at Correlation_Module/correlation.cpp:119)
frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x47 (0x7fb1fe957687 in /home/amax/anaconda3/envs/py36tor131/lib/python3.6/site-packages/torch/lib/libc10.so)
frame #1: + 0x35fc3 (0x7fb1fdc76fc3 in /home/amax/anaconda3/envs/py36tor131/lib/python3.6/site-packages/spatial_correlation_sampler-0.3.0-py3.6-linux-x86_64.egg/spatial_correlation_sampler_backend.cpython-36m-x86_64-linux-gnu.so)
frame #2: + 0x1465f (0x7fb1fe48665f in /home/amax/anaconda3/envs/py36tor131/lib/python3.6/site-packages/torch/lib/../../../../libgomp.so.1)
frame #3: + 0x76ba (0x7fb20311f6ba in /lib/x86_64-linux-gnu/libpthread.so.0)
frame #4: clone + 0x6d (0x7fb202e5551d in /lib/x86_64-linux-gnu/libc.so.6)
terminate called recursively
已放弃
The text was updated successfully, but these errors were encountered:
When I randomly generate a tensor, It's OK. But when I input a picture, it will report an error. How can I solve it?
Code:
d = 3
generate a tensor
input = torch.randn(2,2,2,2)
input a picture
input = Image.open('/data/lu/ls/data/BDDU/ShadowImages/04056725-14e1b11d-00001.png' ).convert('RGB')
input = torch.from_numpy(np.array(input)).unsqueeze(0).permute(0,3,2,1)
out = spatial_correlation_sample(input, input, kernel_size=d, patch_size=d, stride=1, padding=int(d/2))
Error:
terminate called after throwing an instance of 'c10::Error'
what(): "correlation_forward_cpp" not implemented for 'Byte' (operator() at Correlation_Module/correlation.cpp:119)
frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x47 (0x7fb1fe957687 in /home/amax/anaconda3/envs/py36tor131/lib/python3.6/site-packages/torch/lib/libc10.so)
frame #1: + 0x35fc3 (0x7fb1fdc76fc3 in /home/amax/anaconda3/envs/py36tor131/lib/python3.6/site-packages/spatial_correlation_sampler-0.3.0-py3.6-linux-x86_64.egg/spatial_correlation_sampler_backend.cpython-36m-x86_64-linux-gnu.so)
frame #2: + 0x1465f (0x7fb1fe48665f in /home/amax/anaconda3/envs/py36tor131/lib/python3.6/site-packages/torch/lib/../../../../libgomp.so.1)
frame #3: + 0x76ba (0x7fb20311f6ba in /lib/x86_64-linux-gnu/libpthread.so.0)
frame #4: clone + 0x6d (0x7fb202e5551d in /lib/x86_64-linux-gnu/libc.so.6)
terminate called recursively
已放弃
The text was updated successfully, but these errors were encountered: