- TensorFlow 教程
- TensorFlow - 主頁
- TensorFlow - 簡介
- TensorFlow - 安裝
- 瞭解人工智慧
- 數學基礎
- 機器學習與深度學習
- TensorFlow - 基礎
- 卷積神經網路
- 迴圈神經網路
- TensorBoard 視覺化
- TensorFlow - 詞嵌入
- 單層感知器
- TensorFlow - 線性迴歸
- TFLearn 及其安裝
- CNN 和 RNN 的差異
- TensorFlow - Keras
- TensorFlow - 分散式計算
- TensorFlow - 匯出
- 多層感知器學習
- 感知器的隱藏層
- TensorFlow - 最佳化器
- TensorFlow - XOR 實現
- 梯度下降最佳化
- TensorFlow - 構建圖
- 使用 TensorFlow 進行影像識別
- 神經網路訓練建議
- TensorFlow 實用資源
- TensorFlow - 快速指南
- TensorFlow - 實用資源
- TensorFlow - 討論
TensorFlow - 匯出
這裡,我們重點關注 TensorFlow 中的 MetaGraph 形成。這將幫助我們瞭解 TensorFlow 中的匯出模組。MetaGraph 包含基本資訊,這些資訊是訓練、執行評估或對以前訓練過的圖執行推理所必需的。
以下是相同的程式碼片段:-
def export_meta_graph(filename = None, collection_list = None, as_text = False):
"""this code writes `MetaGraphDef` to save_path/filename.
Arguments:
filename: Optional meta_graph filename including the path. collection_list:
List of string keys to collect. as_text: If `True`,
writes the meta_graph as an ASCII proto.
Returns:
A `MetaGraphDef` proto. """
下面提到了相同內容的典型使用模型:-
# Build the model ... with tf.Session() as sess: # Use the model ... # Export the model to /tmp/my-model.meta. meta_graph_def = tf.train.export_meta_graph(filename = '/tmp/my-model.meta')
廣告