The input tensor X's dimensions of MulOp should be larger than x_num_col_dims.
Created by: lewhy2004
- 版本、环境信息: 硬件信息 CPU 4 RAM 32GB GPU v100 显存 16GB 环境配置 Python版本 python3.7 框架版本 PaddlePaddle 1.8.0
训练成功,推理出现如下提示:
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/executor.py:1070: UserWarning: The following exception is not an EOF exception. "The following exception is not an EOF exception.") ---------------------------------------------------------------------------EnforceNotMet Traceback (most recent call last) in 61 results = infer_exe.run(inference_program, #运行预测程序 62 feed={feed_target_names[0]:img}, #喂入要预测的img ---> 63 fetch_list=fetch_targets) 64 print(np.argmax(results)) 65 print(train_label[test_id])
InvalidArgumentError: The input tensor X's dimensions of MulOp should be larger than x_num_col_dims. But received X's dimensions = 1, X's shape = [1024], x_num_col_dims = 1. [Hint: Expected x_dims.size() > x_num_col_dims, but received x_dims.size():1 <= x_num_col_dims:1.] at (/paddle/paddle/fluid/operators/mul_op.cc:62) [operator < mul > error]
模型输入接口shape是 -1,1,1024,3 输入数据shape是 1,1,1024,3