且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

绘制的Keras模型没有给出尺寸

更新时间:2023-12-01 23:46:40

形状元组中的None维度指的是批处理维度,这仅表示该层可以接受任何大小的输入.例如,数据集(例如MNIST)可能具有以下形状元组(60000, 28, 28, 1),但输入层的形状将为(None, 28, 28, 1).

The None dimension in the shape tuple refers to the batch dimension which simply means that the layer can accept input of any size. For example, a dataset (e.g. MNIST) could have the following shape tuple (60000, 28, 28, 1) but the input layer's shape would be (None, 28, 28, 1).

参考文献:

  • keras-team/keras#2054
  • Keras Documentation - Core Layers