预测时报错
Created by: PipgZ
Error Message Summary:
Error: ShapeError: broadcast dimension mismatch. Operands could not be broadcast together with the shape of X = [1, 256, 256, 256] and the shape of Y = [1, 3]. Received [256] in X is not equal to [3] in Y [Hint: Expected y_dims[i] == 1, but received y_dims[i]:3 != 1:1.] at (D:\1.6.2\paddle\paddle/fluid/operators/elementwise/elementwise_op_function.h:79) [operator < elementwise_sub > error]
下面是这个模型训练时的配置文件:
数据集配置
DATASET: DATA_DIR: "./data/" NUM_CLASSES: 2 TEST_FILE_LIST: "./data/validation.txt" TRAIN_FILE_LIST: "./data/training.txt" VAL_FILE_LIST: "./data/val_list.txt" VIS_FILE_LIST: "./data/validation.txt"
预训练模型配置
MODEL: MODEL_NAME: "deeplabv3p" DEFAULT_NORM_TYPE: "bn" DEEPLAB: BACKBONE: "xception_65"
其他配置
TRAIN_CROP_SIZE: (256, 256) EVAL_CROP_SIZE: (256, 256) AUG: AUG_METHOD: "unpadding" FIX_RESIZE_SIZE: (256, 256) BATCH_SIZE: 4 TRAIN: PRETRAINED_MODEL_DIR: "./pretrained_model/deeplabv3p_xception65_bn_coco/" MODEL_SAVE_DIR: "./saved_model/deeplabv3p_xception65_bn_optic/" SNAPSHOT_EPOCH: 5 TEST: TEST_MODEL: "./saved_model/deeplabv3p_xception65_bn_optic/final" SOLVER: NUM_EPOCHS: 10 LR: 0.001 LR_POLICY: "poly" OPTIMIZER: "adam"