keras导入模型预测时报错ValueError: Error when checking input: expected conv2d_1_input to have 4 dimensions, b
ValueError:Errorwhencheckinginput:expectedconv2d_1_inputtohave4dimensions,butgotarraywithshape(X,X,X)解决方法:原因是输入的第一个dimension是bachsize,所以需要将数据reshape为(1,X,X,X)。