![](/img/trans.png)
[英]ValueError: Input 0 of layer sequential is incompatible with the layer: : expected min_ndim=4, found ndim=3. Full shape received: [None, 32, 32]
[英]ValueError: Input 0 of layer sequential is incompatible with the layer: expected ndim=4, found ndim=3. Full shape received: [32, 64, 3]
我的错,也许我研究得不够。 但是,我已经找到了解决方案。
在模型中,数据通过除以 255 进行归一化。
...
img = img / 255.0
img = cv2.resize(img, (64, 64))
...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.