تدفق التوتر:: العمليات:: فك تشفير CSV

#include <parsing_ops.h>

تحويل سجلات CSV إلى الموترات.

ملخص

يعيّن كل عمود موترًا واحدًا.

من المتوقع أن يكون تنسيق RFC 4180 لسجلات CSV. ( https://tools.ietf.org/html/rfc4180 ) لاحظ أننا نسمح بمسافات بادئة وزائدة باستخدام حقل int أو float.

الحجج:

  • النطاق: كائن النطاق
  • السجلات: كل سلسلة عبارة عن سجل/صف في ملف CSV ويجب أن يكون لجميع السجلات نفس التنسيق.
  • Record_defaults: موتر واحد لكل عمود من سجل الإدخال، مع قيمة افتراضية عددية لهذا العمود أو متجه فارغ إذا كان العمود مطلوبًا.

السمات الاختيارية (انظر Attrs ):

  • field_delim: محدد الحرف لفصل الحقول في السجل.
  • use_quote_delim: إذا كان خطأ، يتم التعامل مع علامات الاقتباس المزدوجة كأحرف عادية داخل حقول السلسلة (تجاهل 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
)