上面的巨大数字是什么意思?

数据挖掘 喀拉斯
2022-03-07 21:35:59

我正在尝试可视化神经网络架构。

from keras.utils import plot_model
plot_model(model, to_file='model.png', show_shapes=True)

上面的巨大数字是什么意思?

在此处输入图像描述

1个回答

它不代表任何重要的东西,可能是一个错误(请参阅下面的链接)。这是由于使用了 Sequential API 造成的,因为它省略了输入层,直接将嵌入层作为输入。它可以通过使用功能 API 或通过在 keras/engine/sequential.py 中注释掉它来删除:

@property
def layers(self):
    # Historically, `sequential.layers` only returns layers that were added
    # via `add`, and omits the auto-generated `InputLayer`
    # that comes at the bottom of the stack.
    if self._layers and isinstance(self._layers[0], InputLayer):
        return self._layers[1:]
    return self._layers

你可以在这里这里查看github 上提出的问题