首页 > 解决方案 > 卷积神经网络中的输入和输出形状

问题描述

ValueError: Input 0 of layer sequential_30 is incompatible with the layer: : expected min_ndim=4, found ndim=3. Full shape received: [None, None, None]

标签: pythonimage

解决方案


首先,您提供的详细信息非常少。根据您提供的详细信息,我解释说您正在尝试将numpy array维度 3 的 a 传递给 a CNN Layer。ACNN Layer只接受4-dimensional numpy arrays,但您已将 a3-dimensional numpy array作为输入。为了解决这个问题,将数组reshape为4D数组。如果您提供您的代码,我将能够为您提供您必须使用的确切行。


推荐阅读