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

when running the command: python demo.py --gpu 3 --stage param --test_epoch 8 I get the following error, can someone help me please to solve it #126

Open
duanyuanyi opened this issue Jul 2, 2023 · 1 comment

Comments

@duanyuanyi
Copy link

(I2l-meshnet) [duanyuanyi@gpu demo]$ python demo.py --gpu 3 --stage param --test_epoch 8

Using GPU: 3
/public/home/duanyuanyi/I2L-MeshNet_RELEASE-master/main/../common/utils/smplpytorch/smplpytorch/pytorch/smpl_layer.py:41: 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 ../torch/csrc/utils/tensor_numpy.cpp:178.)
torch.Tensor(smpl_data['betas'].r).unsqueeze(0))
Load checkpoint from ./snapshot_8.pth.tar
/public/home/duanyuanyi/anaconda3/envs/I2l-meshnet/lib/python3.8/site-packages/torch/functional.py:478: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:2895.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
Traceback (most recent call last):
File "demo.py", line 94, in
out = model(inputs, targets, meta_info, 'test')
File "/public/home/duanyuanyi/anaconda3/envs/I2l-meshnet/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/public/home/duanyuanyi/anaconda3/envs/I2l-meshnet/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 169, in forward
return self.gather(outputs, self.output_device)
File "/public/home/duanyuanyi/anaconda3/envs/I2l-meshnet/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 181, in gather
return gather(outputs, output_device, dim=self.dim)
File "/public/home/duanyuanyi/anaconda3/envs/I2l-meshnet/lib/python3.8/site-packages/torch/nn/parallel/scatter_gather.py", line 80, in gather
res = gather_map(outputs)
File "/public/home/duanyuanyi/anaconda3/envs/I2l-meshnet/lib/python3.8/site-packages/torch/nn/parallel/scatter_gather.py", line 69, in gather_map
return type(out)((k, gather_map([d[k] for d in outputs]))
File "/public/home/duanyuanyi/anaconda3/envs/I2l-meshnet/lib/python3.8/site-packages/torch/nn/parallel/scatter_gather.py", line 69, in
return type(out)((k, gather_map([d[k] for d in outputs]))
File "/public/home/duanyuanyi/anaconda3/envs/I2l-meshnet/lib/python3.8/site-packages/torch/nn/parallel/scatter_gather.py", line 73, in gather_map
return type(out)(map(gather_map, zip(*outputs)))
TypeError: expected a sequence of integers or a single integer, got '<map object at 0x2b262fd888b0>'

@duanyuanyi
Copy link
Author

The issue has been resolved by downgrading the PyTorch version to 1.4.0. The reason was that the higher version was causing compatibility problems. By matching the corresponding versions, PyTorch and torchvision can be made compatible, ensuring smooth execution of the code.

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

1 participant