tf.train.Feature
Stay organized with collections
Save and categorize content based on your preferences.
A Feature
is a list which may hold zero or more values.
There are three base Feature
types:
Attributes |
bytes_list
|
BytesList bytes_list
|
float_list
|
FloatList float_list
|
int64_list
|
Int64List int64_list
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2021-05-14 UTC.
[null,null,["Last updated 2021-05-14 UTC."],[],[],null,["# tf.train.Feature\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|\n| [TensorFlow 1 version](/versions/r1.15/api_docs/python/tf/train/Feature) | [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.5.0/tensorflow/core/example/feature.proto) |\n\nA `Feature` is a list which may hold zero or more values.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.train.Feature`](https://www.tensorflow.org/api_docs/python/tf/train/Feature)\n\n\u003cbr /\u003e\n\nThere are three base `Feature` types:\n\n- [`tf.train.BytesList`](../../tf/train/BytesList)\n- [`tf.train.FloatList`](../../tf/train/FloatList)\n- [`tf.train.Int64List`](../../tf/train/Int64List)\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|--------------|------------------------|\n| `bytes_list` | `BytesList bytes_list` |\n| `float_list` | `FloatList float_list` |\n| `int64_list` | `Int64List int64_list` |\n\n\u003cbr /\u003e"]]