python - 卷积神经网络中的输入和输出形状
问题描述
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]
解决方案
首先,您提供的详细信息非常少。根据您提供的详细信息,我解释说您正在尝试将numpy array
维度 3 的 a 传递给 a CNN Layer
。ACNN Layer
只接受4-dimensional numpy arrays
,但您已将 a3-dimensional numpy array
作为输入。为了解决这个问题,将数组reshape为4D数组。如果您提供您的代码,我将能够为您提供您必须使用的确切行。
推荐阅读
- postgresql - PostgreSQL 大于和小于字母数字值
- c# - RabbitMQ - Handle consumer side if routing key not found
- typescript - Defining a deeply nested object in Typescript
- google-chrome - is there a way for Chrome RDP to be accessed by 100 users simultaneously AS VIEWER ONLY (so that they can't click anything)?
- regex - 如何使一场比赛的结束是另一场比赛的开始
- android - Media Session 'Play X' voice command issue - callback isn't triggered
- python - Leap motion controller
- python-3.x - AttributeError: module 'meep' has no attribute 'Vector3' in python3 jupyter notebook
- google-apps-script - Conditional Format Google Apps Script
- reactjs - React/Material-Table | Why is onFilterChanged returning rows where the filtered value is null?