预测MSRGCN

一、创建虚拟环境

Dependencies
Pytorch 1.7.0+cu110
Python 3.8.5
Nvidia RTX 3090

1.cmd创建虚拟环境

conda create -n pre python==3.8(Python==3.8.5版本不匹配)

2.在pre虚拟环境中安装Pytorch 1.7.0+cu110

1.conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=11.0 -c pytorch
2.pip install torch==1.7.0+cu110 torchvision==0.8.0+cu110 torchaudio==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html

对应版本的两条命令无法成功安装,选择相近版本进行安装

pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html

3.安装其他依赖包

Package                     Version
--------------------------------------------
future                 0.18.2
h5py                   3.1.0
matplotlib             3.3.3
numpy                  1.19.4
opencv-python          4.5.2.52
pandas                 1.1.4
Pillow                 8.0.1
progress               1.5
PyYAML                 5.4.1
tensorboardX           2.1
torch                  1.7.0+cu110
torchaudio             0.7.0
torchvision            0.8.1+cu110

将requirement.txt文件进行改动

future==0.18.2
h5py==3.1.0
matplotlib==3.3.3
numpy==1.19.4
opencv-python==4.5.2.52
pandas==1.1.4
Pillow==8.0.1
progress==1.5
PyYAML==5.4.1
tensorboardX==2.1

运行安装命令

pip install -r requirement.txt

二、运行训练命令

python main.py --exp_name=h36m --is_train=1 --output_n=25 --dct_n=35 --test_manner=all

1.报错

ModuleNotFoundError: No module named 'seaborn'

解决:

pip install seaborn

2.报错

If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

解决:Downgrade the protobuf package to 3.20.x or lower(意为protobuf版本过高)

1.pip uninstall protobuf
2.pip install protobuf~=3.19.0

3.报错:内存不足

  File "main.py", line 67, in <module>
    r = H36MRunner(exp_name=args.exp_name, input_n=args.input_n, output_n=args.output_n, dct_n=args.dct_n, device=args.device, num_works=args.num_works,
  File "F:\prediction\MSRGCN-main\run\h36m_runner.py", line 93, in __init__
    train_dataset = H36MMotionDataset(self.cfg.base_data_dir, actions="all", mode_name="train", input_n=self.cfg.input_n, output_n=self.cfg.output_n,
  File "F:\prediction\MSRGCN-main\datas\h36m\motiondataset.py", line 53, in __init__
    input_all_scales[k] = dct_transform_numpy(input_all_scales[k], self.dct_m, dct_used)
  File "F:\prediction\MSRGCN-main\datas\dct.py", line 35, in dct_transform_numpy
    out_data = np.matmul(dct_m[:dct_n, :], data)  # [dct_n, 180077*60]
MemoryError: Unable to allocate 4.55 GiB for an array with shape (35, 17432064) and data type float64

4.训练过程中报错:

WARNING:root:NaN or Inf found in input tensor
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值