テンソルフロー::作戦::復元する

#include <io_ops.h>

チェックポイント ファイルからテンソルを復元します。

まとめ

1 つまたは複数のファイルに保存されているテンソルを読み取ります。複数のファイルがある場合 (たとえば、テンソルがスライスとして保存されたため)、 file_patternには、ディレクトリ部分ではなくファイル名部分にのみワイルドカード記号 ( *? ) が含まれる場合があります。

file_pattern複数のファイルに一致する場合、 preferred_shard使用して、要求されたテンソルがどのファイルに見つかる可能性が高いかを示すことができます。この操作は、まず、一致するファイルのリスト内のインデックスpreferred_shardにあるファイルを開き、そのファイルからテンソルを復元しようとします。一部のテンソルまたはテンソル スライスが最初のファイルで見つからない場合にのみ、Op はすべてのファイルを開きます。一致するSave操作のshard入力として渡される値と一致するようにpreferred_shardを設定すると、復元が高速化される可能性があります。この属性はパフォーマンスにのみ影響し、正確さには影響しません。デフォルト値 -1 は、ファイルが順番に処理されることを意味します。

RestoreSliceも参照してください。

引数:

  • スコープ:スコープオブジェクト
  • file_pattern: 単一の要素が必要です。テンソルを読み取るファイルのパターン。
  • tensor_name: 単一の要素が必要です。復元するテンソルの名前。
  • dt: 復元するテンソルのタイプ。

オプションの属性 ( Attrsを参照):

  • preferred_shard: 複数のファイルがfile_patternに一致する場合に最初に開くファイルのインデックス。

戻り値:

  • Output : 復元されたテンソル。

コンストラクターとデストラクター

Restore (const :: tensorflow::Scope & scope, :: tensorflow::Input file_pattern, :: tensorflow::Input tensor_name, DataType dt)
Restore (const :: tensorflow::Scope & scope, :: tensorflow::Input file_pattern, :: tensorflow::Input tensor_name, DataType dt, const Restore::Attrs & attrs)

パブリック属性

operation
tensor

公共機能

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

パブリック静的関数

PreferredShard (int64 x)

構造体

tensorflow:: ops:: Restore:: Attrs

Restoreのオプションの属性セッター。

パブリック属性

手術

Operation operation

テンソル

::tensorflow::Output tensor

公共機能

復元する

 Restore(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input file_pattern,
  ::tensorflow::Input tensor_name,
  DataType dt
)

復元する

 Restore(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input file_pattern,
  ::tensorflow::Input tensor_name,
  DataType dt,
  const Restore::Attrs & attrs
)

ノード

::tensorflow::Node * node() const 

演算子::tensorflow::入力

 operator::tensorflow::Input() const 

演算子::tensorflow::出力

 operator::tensorflow::Output() const 

パブリック静的関数

優先シャード

Attrs PreferredShard(
  int64 x
)