关于 Keras 网络层

    • : 以含有Numpy矩阵的列表形式返回层的权重。
    • layer.set_weights(weights): 从含有Numpy矩阵的列表中设置层的权重(与get_weights的输出形状相同)。
    • layer.get_config(): 返回包含层配置的字典。此图层可以通过以下方式重置:
    1. from keras import layers
    2. config = layer.get_config()
    3. layer = layers.deserialize({'class_name': layer.__class__.__name__,
    4. 'config': config})
    • layer.input
    • layer.input_shape
    • layer.output_shape
    • layer.get_input_at(node_index)
    • layer.get_output_at(node_index)
    • layer.get_output_shape_at(node_index)