tensorflow:: ops:: DecodeCSV

#include <parsing_ops.h>

CSVレコードをテンソルに変換します。

まとめ

各列は1つのテンソルに対応します。

CSVレコードはRFC 4180形式である必要があります。( https://tools.ietf.org/html/rfc4180 )なお、整数型または浮動小数点型のフィールドでは、先頭と末尾に空白文字を含めることができます。

議論:

  • スコープ:スコープオブジェクト
  • レコード: 各文字列はCSVファイル内のレコード/行であり、すべてのレコードは同じ形式である必要があります。
  • record_defaults: 入力レコードの各列ごとに1つのテンソル。その列にはスカラーのデフォルト値が指定されるか、列が必須の場合は空のベクトルが指定されます。

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

  • field_delim: レコード内のフィールドを区切る文字区切り文字。
  • use_quote_delim: false の場合、文字列フィールド内の二重引用符を通常の文字として扱います (RFC 4180、セクション 2、箇条書き 5 を無視します)。
  • na_value: NA/NaNとして認識するための追加の文字列。

返品:

  • OutputList :各テンソルはレコードと同じ形状になります。

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

DecodeCSV (const :: tensorflow::Scope & scope, :: tensorflow::Input records, :: tensorflow::InputList record_defaults)
DecodeCSV (const :: tensorflow::Scope & scope, :: tensorflow::Input records, :: tensorflow::InputList record_defaults, const DecodeCSV::Attrs & attrs)

公開属性

operation
output

公的機能

operator[] (size_t index) const

パブリック静的関数

FieldDelim (StringPiece x)
NaValue (StringPiece x)
SelectCols (const gtl::ArraySlice< int > & x)
UseQuoteDelim (bool x)

構造

tensorflow:: ops:: DecodeCSV:: Attrs

DecodeCSVのオプション属性設定子。

公開属性

手術

Operation operation

出力

::tensorflow::OutputList output

公的機能

DecodeCSV

 DecodeCSV(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input records,
  ::tensorflow::InputList record_defaults
)

DecodeCSV

 DecodeCSV(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input records,
  ::tensorflow::InputList record_defaults,
  const DecodeCSV::Attrs & attrs
)

オペレーター[]

::tensorflow::Output operator[](
  size_t index
) const 

パブリック静的関数

フィールド区切り

Attrs FieldDelim(
  StringPiece x
)
Attrs NaValue(
  StringPiece x
)

列を選択

Attrs SelectCols(
  const gtl::ArraySlice< int > & x
)

UseQuoteDelim

Attrs UseQuoteDelim(
  bool x
)