Link Search Menu Expand Document

DecodeCSV


tensorflow C++ API

tensorflow::ops::DecodeCSV

Convert CSV records to tensors.


Summary

Each column maps to one tensor.

RFC 4180 format is expected for the CSV records. (https://tools.ietf.org/html/rfc4180) Note that we allow leading and trailing spaces with int or float field.

Arguments:

  • scope: A Scope object
  • records: Each string is a record/row in the csv and all records should have the same format.
  • record_defaults: One tensor per column of the input record, with either a scalar default value for that column or empty if the column is required.

Optional attributes (seeAttrs):

  • field_delim: char delimiter to separate fields in a record.
  • use_quote_delim: If false, treats double quotation marks as regular characters inside of the string fields (ignoring RFC 4180, Section 2, Bullet 5).

Returns:

  • OutputList: Each tensor will have the same shape as records..

DecodeCSV block

Source link : https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_parsing_op.cpp

Argument:

  • Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
  • Input records: connect Input node.
  • Input record_defaults: connect Input node.
  • DecodeCSV ::Attrs attrs: input attrs in values ex)field_delim_ =;use_quote_delim_=true;

Return:

  • Output output : Output object of DecodeCSV class object.

Result:

  • std::vector(Tensor) result_output : Returned object of executed result by calling session.

Using Method