import os
def get_pb_file_size(pb_file):
"""Returns the size of the TensorFlow .pb file in bytes."""
return os.path.getsize(pb_file)
pb_file = '/tmp/tfc_metagraphs/hific-lo.metagraph'
size_bytes = get_pb_file_size(pb_file)
print(f"PB file size: {size_bytes / (1024 * 1024):.2f} MB")
脚本,输出模型size
最新推荐文章于 2024-08-05 17:04:33 发布