基于pytorch1.1,自己训练了个模型文件:VOC.pkl
0_import_model.sh改写为:
#!/bin/bash
NAME=pytorch
ACUITY_PATH=…/bin/
convert_pytorch=${ACUITY_PATH}convertpytorch
$convert_pytorch --pytorch-model ./model/VOC.pkl --net-output cnn.json --data-output cnn.data --input-size-list ‘1,28,28’
执行0_import_model.sh转换时候报错如下:
cxhos@cxhos:~/actuity_linux_pytorch_COCO/conversion_scripts$ sudo sh 0_import_model.sh
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings’
Current thread 0x00007f1afb7e0740 (most recent call first):
0_import_model.sh: line 8: 3555973 Aborted (core dumped) $convert_pytorch --pytorch-model ./model/VOC.pkl --net-output cnn.json --data-output cnn.data --input-size-list ‘1,28,28’
请教下是环境问题吗?