yolov3训练后量化 出错
Created by: aixier
CPU8 RAM32GB GPUv100 显存16GB 磁盘100GB 环境配置 Python版本python3.7 框架版本 PaddlePaddle 1.7.0 运行代码:
input_size=(3, 512, 512)
sys.path[0] = os.path.join(
os.path.dirname("__file__"), os.path.pardir, os.path.pardir)
def quantize():
val_reader = mjreader.custom_reader(images_lists, data_dir, input_size,mode)
place = fluid.CUDAPlace(0)
exe = fluid.Executor(place)
quant_post(
executor=exe,
model_dir='../work/PaddleDetection/yolov3_dark_freeze/mj_yolov3_darknet',
quantize_model_path='./yolov3_darknet_quant/',
sample_generator=val_reader,
model_filename='__model__',
params_filename='__params__',
batch_size=16,
batch_nums=20)
Error Message Summary:
InvalidArgumentError: Input(ImgSize) dim[0] and Input(X) dim[0] should be same. [Hint: Expected dim_imgsize[0] == dim_x[0], but received dim_imgsize[0]:4800 != dim_x[0]:16.] at (/paddle/paddle/fluid/operators/detection/yolo_box_op.cc:50) [operator < yolo_box > error]