TensorFlow函數(shù):tf.estimator.Exporter

2018-05-02 09:58 更新

tf.estimator.Exporter函數(shù)

Exporter類

定義在:tensorflow/python/estimator/exporter.py.

一個代表模型導(dǎo)出類型的類.

屬性

  • name

    目錄名稱.

    該類型導(dǎo)出的導(dǎo)出基目錄下的目錄名稱,不應(yīng)該是None,也不是空的.

方法

export

export(
    estimator,
    export_path,
    checkpoint_path,
    eval_result,
    is_the_final_export
)

將給定Estimator導(dǎo)出為特定的格式.

函數(shù)參數(shù):

  • estimator:要導(dǎo)出的Estimator.
  • export_path:一個字符串,其中包含要編寫導(dǎo)出的目錄.
  • checkpoint_path:要導(dǎo)出的檢查點路徑.
  • eval_result:這個檢查點的Estimator.evaluate輸出.
  • is_the_final_export:當這是訓(xùn)練結(jié)束時的導(dǎo)出時,此布爾值為True;訓(xùn)練期間的中間出口為False.如果TrainSpec.max_steps是None,則當向tf.estimator.train_and_evaluate is_the_final_export傳遞Exporter時,總是為False.

返回值:

tf.estimator.Exporter函數(shù)返回導(dǎo)出目錄的字符串路徑,如果跳過導(dǎo)出,則為None.

以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號