关于image_classification输入图片尺寸的问题
Created by: lxk767363331
!python image_classification/train.py \
--data_dir=breast/ \
--total_images=6356 \
--class_dim=8 \
--validate=True \
--model=HRNet_W32_C \
--batch_size=16 \
--lr_strategy=cosine_decay \
--image_shape 3 700 460 \
--lr=0.001 \
--num_epochs=200 \
--model_save_dir=output/ \
--l2_decay=7e-5 \
--use_mixup=True \
--use_label_smoothing=True \
--label_smoothing_epsilon=0.1 \
--pretrained_model=best/HRNet_W32_C
我尝试不适用预训练模型 分别使用 --image_shape 3 700 460 / --image_shape 3 460 460
均报错,可否有解释,如何更改?
-image_shape 3 460 460 报错结果如下:
Error Message Summary:
使用这个指令进行训练时 增加 --image_shape 3 700 460 \ 报错结果如下:
ValueError: The feeded Variable 'feed_image' should have dimensions = 4, shape = (-1, 3, 700, 460), but received feeded shape [16, 3, 700, 700]
请问在代码中如何设置此项,我在reader中没有找到?
还有一个问题Error: ShapeError: broadcast dimension mismatch. Operands could not be broadcast together with the shape of X = [16, 32, 115, 115] and the shape of Y = [16, 32, 116, 116]. Received [115] in X is not equal to [116] in Y [Hint: Expected y_dims[i] == 1, but received y_dims[i]:116 != 1:1.] at (/paddle/paddle/fluid/operators/elementwise/elementwise_op_function.h:79) [operator < elementwise_add > error]