tf.decode_csv()

tf.decode_csv(records, record_defaults, field_delim=None, name=None)

Convert CSV records to tensors. 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.

Args:
  • records: A Tensor of type string. Each string is a record/row in the csv and all records should have the same format.
  • record_defaults: A list of Tensor objects with types from: float32, int32, int64, string. One tensor per column of the input record, with either a scalar default value for that column or empty if the column is required.
  • field_delim: An optional string. Defaults to ",". delimiter to separate fields in a record.
  • name: A name for the operation (optional).
Returns:

A list of Tensor objects. Has the same type as record_defaults. Each tensor will have the same shape as records.

doc_TensorFlow
2016-10-14 13:07:35
Comments
Leave a Comment

Please login to continue.