PaddleX恢复训练出错怎么破?
收藏
如题:PaddleX恢复训练出错怎么破?
model.train(
num_epochs=500,
train_dataset=train_dataset,
train_batch_size=50,
eval_dataset=eval_dataset,
learning_rate=0.001 / 8,
warmup_steps=1000,
warmup_start_lr=0.0,
save_interval_epochs=10,
lr_decay_epochs=[216, 243],
resume_checkpoint="output/yolov3_mobilenet/epoch_260",
save_dir='output/yolov3_mobilenet')
2021-09-05 22:31:48 [ERROR] pretrain_weights and resume_checkpoint cannot be set simultaneously.
An exception has occurred, use %tb to see the full traceback.
SystemExit: -1
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/IPython/core/interactiveshell.py:3273: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D.
warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)
0
收藏
请登录后评论
看报错说不能同步用预训练权重和存盘点,把预训练权重去掉试试?
也没看见设置预训练权重的参数啊,奇怪,难道还得删缓存
查了源码,默认加载,非得写上none才算完
感觉此处可以优化,如果有resume_checkpoint,那么默认就用这个,不用预训练模型。
应该这样更符合逻辑
用了checkpoint的话,预训练参数就被覆盖了。paddleclass套件就是覆盖的
必须加:pretrain_weights=None, # 如果接续训练,必须设置pretrain_weights=None
接续训练时必须pretrain_weights=None,否则默认带预训练模型,
pretrain_weights (str): 若指定为路径时,则加载路径下预训练模型;若为字符串'IMAGENET', # 则自动下载在ImageNet图片数据上预训练的模型权重;若为字符串'COCO'。
也许下个版本就会优化了
有道理