【问题标题】:Keras model to plot gives none, dimensions要绘制的 Keras 模型没有给出任何尺寸
【发布时间】:2018-06-04 17:43:18
【问题描述】:

我正在尝试使用 Keras 绘制 VGG16 架构图。但是,我看到下面带有None 的图像,一些尺寸。 None 是什么意思,这是一个错误吗?

from keras.utils import plot_model
model = VGG19(include_top=True, weights='imagenet')
#print(model.summary())
plot_model(model, to_file='model_Vgg19.png',show_shapes=True)

我可以看到这是 Keras 中的一个已知问题:https://github.com/keras-team/keras/issues/1877

【问题讨论】:

    标签: python deep-learning keras


    【解决方案1】:

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

    参考资料:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-02-10
      • 2022-07-08
      • 2017-02-26
      • 1970-01-01
      • 1970-01-01
      • 2018-03-06
      • 1970-01-01
      • 2021-12-17
      相关资源
      最近更新 更多