image_classification 预训练出错
Created by: dbcool
您好,我用ImageNet的模型,进行finetune的时候出错,用的预训练模型和分类数是
--pretrained_model=pretrained_model/ResNeXt50_vd_64x4d_pretrained
--class_dim=14
训练指令为:
python train.py
--model=ResNeXt50_vd_64x4d
--batch_size=32
--num_epochs=100
--total_images=833458
--data_dir="./data/terror_detail/"
--pretrained_model=pretrained_model/ResNeXt50_vd_64x4d_pretrained
--class_dim=14
--image_shape=3,224,224
--model_save_dir=output/
--with_mem_opt=False
--with_inplace=True
--lr_strategy=piecewise_decay
--lr=0.001
报错: train_fetch_list [u'mean_0.tmp_0', u'accuracy_0.tmp_0', u'accuracy_1.tmp_0', u'learning_rate'] ..... File "train.py", line 622, in main() C++ Callstacks: Enforce failed. Expected param_dim == ctx->GetInputDim("Velocity"), but received param_dim:1000 != ctx->GetInputDim("Velocity"):14. Param and Velocity of MomentumOp should have the same dimension. at [/paddle/paddle/fluid/operators/optimizers/momentum_op.h:65]