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
I think I might be over complicating the process, but here is what I tried so far:
I have tried calling the Neural_SLAM_Module() alone first to test out using my own images, but I can't seem to get that to work let alone the other models for exploration.
/home/.../Desktop/Neural-SLAM/test.py:27: UserWarning: The given NumPy array is not writable, and PyTorch does not support non-writable tensors. This means writing to this tensor will result in undefined behavior. You may want to copy the array to protect its data or make it writable before converting it to a tensor. This type of warning will be suppressed for the rest of this program. (Triggered internally at /opt/conda/conda-bld/pytorch_1678402411778/work/torch/csrc/utils/tensor_numpy.cpp:206.)
obs = torch.from_numpy(np.transpose(np.expand_dims(img, axis=0), (0, 1, 3, 2))).float().to(device)
torch.Size([1, 3, 128, 128])
Auto GPU config:
Number of processes: 24
Number of processes on GPU 0: 8
Number of processes per GPU: 16
/home/.../anaconda3/envs/neuralslam/lib/python3.10/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
warnings.warn(
/home/.../anaconda3/envs/neuralslam/lib/python3.10/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or None for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing weights=ResNet18_Weights.IMAGENET1K_V1. You can also use weights=ResNet18_Weights.DEFAULT to get the most up-to-date weights.
warnings.warn(msg)
/home/.../anaconda3/envs/neuralslam/lib/python3.10/site-packages/torch/nn/functional.py:4298: UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details.
warnings.warn(
Traceback (most recent call last):
File "/home/.../Desktop/Neural-SLAM/test.py", line 44, in
nslam_module(last_obs, obs, poses, local_map[:, 0, :, :],
File "/home/.../anaconda3/envs/neuralslam/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/.../Desktop/Neural-SLAM/model.py", line 209, in forward
rot_mat, trans_mat = get_grid(st_poses,
File "/home/.../Desktop/Neural-SLAM/utils/model.py", line 40, in get_grid
rot_grid = F.affine_grid(theta1, torch.Size(grid_size))
File "/home/.../anaconda3/envs/neuralslam/lib/python3.10/site-packages/torch/nn/functional.py", line 4341, in affine_grid
return torch.affine_grid_generator(theta, size, align_corners)
RuntimeError: Expected size for first two dimensions of batch2 tensor to be: [1, 3] but got: [24, 3].
The text was updated successfully, but these errors were encountered:
I think I might be over complicating the process, but here is what I tried so far:
I have tried calling the Neural_SLAM_Module() alone first to test out using my own images, but I can't seem to get that to work let alone the other models for exploration.
test.py file:
This gives me the following error:
/home/.../Desktop/Neural-SLAM/test.py:27: UserWarning: The given NumPy array is not writable, and PyTorch does not support non-writable tensors. This means writing to this tensor will result in undefined behavior. You may want to copy the array to protect its data or make it writable before converting it to a tensor. This type of warning will be suppressed for the rest of this program. (Triggered internally at /opt/conda/conda-bld/pytorch_1678402411778/work/torch/csrc/utils/tensor_numpy.cpp:206.)
obs = torch.from_numpy(np.transpose(np.expand_dims(img, axis=0), (0, 1, 3, 2))).float().to(device)
torch.Size([1, 3, 128, 128])
Auto GPU config:
Number of processes: 24
Number of processes on GPU 0: 8
Number of processes per GPU: 16
/home/.../anaconda3/envs/neuralslam/lib/python3.10/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
warnings.warn(
/home/.../anaconda3/envs/neuralslam/lib/python3.10/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or
None
for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passingweights=ResNet18_Weights.IMAGENET1K_V1
. You can also useweights=ResNet18_Weights.DEFAULT
to get the most up-to-date weights.warnings.warn(msg)
/home/.../anaconda3/envs/neuralslam/lib/python3.10/site-packages/torch/nn/functional.py:4298: UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details.
warnings.warn(
Traceback (most recent call last):
File "/home/.../Desktop/Neural-SLAM/test.py", line 44, in
nslam_module(last_obs, obs, poses, local_map[:, 0, :, :],
File "/home/.../anaconda3/envs/neuralslam/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/.../Desktop/Neural-SLAM/model.py", line 209, in forward
rot_mat, trans_mat = get_grid(st_poses,
File "/home/.../Desktop/Neural-SLAM/utils/model.py", line 40, in get_grid
rot_grid = F.affine_grid(theta1, torch.Size(grid_size))
File "/home/.../anaconda3/envs/neuralslam/lib/python3.10/site-packages/torch/nn/functional.py", line 4341, in affine_grid
return torch.affine_grid_generator(theta, size, align_corners)
RuntimeError: Expected size for first two dimensions of batch2 tensor to be: [1, 3] but got: [24, 3].
The text was updated successfully, but these errors were encountered: