山西高端建设网站,建设99网站,网站的行为怎么做,内蒙古app开发公司1、训练指令
#xff08;1#xff09;添加resume参数#xff0c;参数值改为true
#xff08;2#xff09;weights参数#xff0c;参数值改为中断前上次训练权重
中断后继续训练命令#xff1a;
python.exe train.py --weights runs/train/exp9/weights/last.pt --re…1、训练指令
1添加resume参数参数值改为true
2weights参数参数值改为中断前上次训练权重
中断后继续训练命令
python.exe train.py --weights runs/train/exp9/weights/last.pt --resume True
2、报错
TypeError: Descriptors cannot be created directly. 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_IMPLEMENTATIONpython (but this will use pure-Python parsing and will be much slower).
处理
看报错提示是protobuf这个库版本不对protobuf需要3.20.x或以下版本我查了下我自己的版本是4.15.2。版本不对那就卸载原来的protobuf再安装一个符号要求的版本
pip uninstall protoc
安装
pip install protobuf3.19.0 3、安装protobuf3.19.0后又报错
ERROR: pips dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. onnx 1.15.0 requires protobuf3.20.2, but you have protobuf 3.19.0 which is incompatible. tensorflow-gpu 2.7.0rc0 requires numpy~1.19.2, but you have numpy 1.22.4 which is incompatible. Successfully installed protobuf-3.19.0
看报错提示还是版本不匹配我安装了protobuf 3.19.0版本但是需要3.20.2以上的版本
那就改成3.20.2版本。
卸载原来的protobuf
pip uninstall protobuf
安装protobuf3.20.2
pip install protobuf3.20.2
4、protobuf版本问题搞定后再次运行训练命令
python.exe train.py --weights runs/train/exp9/weights/last.pt --resume True
ok接着之前中断的训练继续训练了