keras提供了两个针对权值矩阵的网络层操作函数 layer.get_weights(): 以Numpy矩阵的形式返回层的权重。 layer.set_weights(weights): 从Numpy矩阵中设置层的权重(与get_weights的输出形状相同&#x