【问题标题】:Negative Dimension caused with input shape输入形状引起的负维度
【发布时间】:2020-05-21 02:10:22
【问题描述】:

我的 xception 模型中的输入大小有误。错误是ValueError: Negative dimension size caused by subtracting 3 from 2 for 'conv2d_12/Conv2D' (op: 'Conv2D') with input shapes: [?,7,2,728], [3,3,728,728]. 如果您想要程序打印的所有内容,请告诉我。另外,我的模型在https://mystb.in/rebegituya.py。谢谢!

【问题讨论】:

    标签: python artificial-intelligence conv-neural-network


    【解决方案1】:

    我解决了,错误是由于我的神经网络中的层数。它适用于带有填充的那么多层,但我现在只使用了一个基本的卷积网络。我还使用 categorical_crossentropy 作为损失函数,因为 sparse_categorical_crossentropy 会出错。

    【讨论】:

      猜你喜欢
      • 2020-10-20
      • 2020-01-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多