【问题标题】:Tensorflow show model summaryTensorFlow 展示模型总结
【发布时间】:2020-10-12 22:08:03
【问题描述】:

我有一个我训练并保存了模型的 UNet。我想查看模型摘要,但是当我使用model.summary() 时,Output Shape 列被切断,无法看到完整的形状。该模型在 3D 图像上进行了训练,因此输出应显示 (None, shapeX, shapeY, shapeZ, num_features)。如何显示完整的输出形状?

from tensorflow.keras.models import load_model
        
model = load_model('model.h5',compile = False)
model.summary()

model.summary()

【问题讨论】:

    标签: python tensorflow


    【解决方案1】:

    您可以设置tf.summary函数的line_length属性。

    model.summary(line_length = 100)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-17
      • 1970-01-01
      • 1970-01-01
      • 2018-06-04
      相关资源
      最近更新 更多