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

您好,我想请教一下,我是按照描述安装的pytorch1.4,但是进行训练时错误如下?似乎是版本太过陈旧,然后我更换到1.12以上又会报其他错误。请问大佬这是什么原因? #20

Open
fonsjiang opened this issue Mar 26, 2024 · 1 comment

Comments

@fonsjiang
Copy link

(OG) francisjiang@francisjiang:~/desktop/person-reid-3d$ python train_M.py --batch-size 30 --name Market_Efficient_ALL_2SDDense_b30_lr6_flip_slim0.5_warm10_scale_e0_d7+bg_adam_init768_clusterXYZRGB_e1000_id2_bn_k9_conv2_balance --id_skip 2 --slim 0.5 --flip --scale --lrRate 6e-4 --gpu_ids 0 --warm_epoch 10 --erase 0 --droprate 0.7 --use_dense --bg 1 --adam --init 768 --cluster xyzrgb --train_all --num-epoch 1000 --feature_dims 48,96,96,192,192,384,384 --efficient --k 9 --num_conv 2 --dataset 2DMarket --balance --gem --norm_layer bn2 --circle --amsgrad --gamma 64
/home/francisjiang/anaconda3/envs/OG/lib/python3.7/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: libtorch_cpu.so: cannot open shared object file: No such file or directory
warn(f"Failed to load image Python extension: {e}")
Traceback (most recent call last):
File "train_M.py", line 6, in
from market3d import Market3D
File "/home/francisjiang/desktop/person-reid-3d/market3d.py", line 1, in
from torchvision import datasets
File "/home/francisjiang/anaconda3/envs/OG/lib/python3.7/site-packages/torchvision/init.py", line 7, in
from torchvision import models
File "/home/francisjiang/anaconda3/envs/OG/lib/python3.7/site-packages/torchvision/models/init.py", line 2, in
from .convnext import *
File "/home/francisjiang/anaconda3/envs/OG/lib/python3.7/site-packages/torchvision/models/convnext.py", line 8, in
from ..ops.misc import Conv2dNormActivation, Permute
File "/home/francisjiang/anaconda3/envs/OG/lib/python3.7/site-packages/torchvision/ops/init.py", line 2, in
from .boxes import (
File "/home/francisjiang/anaconda3/envs/OG/lib/python3.7/site-packages/torchvision/ops/boxes.py", line 78, in
@torch.jit._script_if_tracing
AttributeError: module 'torch.jit' has no attribute '_script_if_tracing'

@layumi
Copy link
Owner

layumi commented Mar 27, 2024

Hi @fonsjiang

Please see pytorch/pytorch#42078

pip uninstall torchvision
pip install torchvision==0.5.0 -f https://download.pytorch.org/whl/torch_stable.html

Please check the torchvision version. It should match the pytorch version as follows.
image

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