tensorflow::ops::DecodeCSV

#include <parsing_ops.h>

แปลงข้อมูล CSV เป็นเทนเซอร์

สรุป

แต่ละคอลัมน์จะแมปกับเทนเซอร์หนึ่งตัว

รูปแบบไฟล์ CSV ที่คาดหวังคือเป็นไปตามมาตรฐาน RFC 4180 ( https://tools.ietf.org/html/rfc4180 ) โปรดทราบว่าเราอนุญาตให้มีช่องว่างนำหน้าและต่อท้ายสำหรับฟิลด์ประเภทจำนวนเต็มหรือทศนิยม

ข้อโต้แย้ง:

  • ขอบเขต: วัตถุ ขอบเขต
  • ระเบียน: แต่ละสตริงคือระเบียน/แถวในไฟล์ CSV และระเบียนทั้งหมดควรมีรูปแบบเดียวกัน
  • record_defaults: เทนเซอร์หนึ่งตัวต่อหนึ่งคอลัมน์ของเรคอร์ดอินพุต โดยมีค่าเริ่มต้นเป็นค่าสเกลาร์สำหรับคอลัมน์นั้น หรือเป็นเวกเตอร์ว่างหากคอลัมน์นั้นจำเป็น

คุณลักษณะเสริม (ดูที่ 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

หน้าที่สาธารณะ

ถอดรหัส CSV

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

ถอดรหัส CSV

 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
)