テンソルフロー::作戦::テンソル配列

#include <data_flow_ops.h>

指定されたサイズの Tensor の配列。

まとめ

Write 経由でデータを書き込み、Read または Pack 経由でデータを読み取ります。

引数:

  • スコープ:スコープオブジェクト
  • size: 配列のサイズ。
  • dtype: tensor_array 上の要素のタイプ。

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

  • element_shape: 要素の予想される形状 (既知の場合)。 TensorArray要素の形状を検証するために使用されます。この形状が完全に指定されていない場合、サイズがゼロの TensorArray を収集するとエラーになります。
  • Dynamic_size: TensorArrayへの書き込みによるサイズの拡大を許可するかどうかを決定するブール値。デフォルトでは、これは許可されていません。
  • clear_after_read: true (デフォルト) の場合、 TensorArray内の Tensor は読み取られた後にクリアされます。これにより、複数の読み取りセマンティクスが無効になりますが、メモリの早期解放が可能になります。
  • 同一の要素_形状: true (デフォルトは false) の場合、 TensorArray内のすべての要素は同一の形状を持つことが期待されます。これにより、書き込み時に一貫した形状を動的にチェックしたり、element_shape 属性が完全に定義されていない場合でも、スタック上で適切な形状のゼロ テンソルを埋めることができるなど、特定の動作が可能になります。
  • tensor_array_name: 一時的な tensor_array リソースに使用される名前をオーバーライドします。デフォルト値は、「 TensorArray 」演算子の名前です (一意であることが保証されています)。

戻り値:

  • Outputハンドル: TensorArrayへのハンドル。
  • Outputフロー: 勾配フローの制御に使用されるスカラー。

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

TensorArray (const :: tensorflow::Scope & scope, :: tensorflow::Input size, DataType dtype)
TensorArray (const :: tensorflow::Scope & scope, :: tensorflow::Input size, DataType dtype, const TensorArray::Attrs & attrs)

パブリック属性

flow
handle
operation

パブリック静的関数

ClearAfterRead (bool x)
DynamicSize (bool x)
ElementShape (PartialTensorShape x)
IdenticalElementShapes (bool x)
TensorArrayName (StringPiece x)

構造体

tensorflow:: ops:: TensorArray:: Attrs

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

パブリック属性

流れ

::tensorflow::Output flow

ハンドル

::tensorflow::Output handle

手術

Operation operation

公共機能

テンソル配列

 TensorArray(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input size,
  DataType dtype
)

テンソル配列

 TensorArray(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input size,
  DataType dtype,
  const TensorArray::Attrs & attrs
)

パブリック静的関数

ClearAfterRead

Attrs ClearAfterRead(
  bool x
)

動的サイズ

Attrs DynamicSize(
  bool x
)

要素の形状

Attrs ElementShape(
  PartialTensorShape x
)

同一の要素形状

Attrs IdenticalElementShapes(
  bool x
)

テンソル配列名

Attrs TensorArrayName(
  StringPiece x
)