diff options
Diffstat (limited to 'tensorflow/core/example/example.proto')
-rw-r--r-- | tensorflow/core/example/example.proto | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/tensorflow/core/example/example.proto b/tensorflow/core/example/example.proto new file mode 100644 index 0000000000..194d1e7c24 --- /dev/null +++ b/tensorflow/core/example/example.proto @@ -0,0 +1,95 @@ +// Protocol messages for describing input data Examples for machine learning +// model training or inference. +syntax = "proto3"; + +import "tensorflow/core/example/feature.proto"; +// option cc_enable_arenas = true; + +package tensorflow; + +// Example for a movie recommendation application: +// features { +// feature { +// key: "age" +// float_list { +// value: 29.0 +// } +// } +// feature { +// key: "movie" +// bytes_list { +// value: "The Shawshank Redemption" +// value: "Fight Club" +// } +// } +// feature { +// key: "movie_ratings" +// float_list { +// value: 9.0 +// value: 9.7 +// } +// } +// feature { +// key: "suggestion" +// bytes_list { +// value: "Inception" +// } +// } +// # Note that this feature exists to be used as a label in training. +// # E.g., if training a logistic regression model to predict purchase +// # probability in our learning tool we would set the label feature to +// # "suggestion_purchased". +// feature { +// key: "suggestion_purchased" +// float_list { +// value: 1.0 +// } +// } +// # Similar to "suggestion_purchased" above this feature exists to be used +// # as a label in training. +// # E.g., if training a linear regression model to predict purchase +// # price in our learning tool we would set the label feature to +// # "purchase_price". +// feature { +// key: "purchase_price" +// float_list { +// value: 9.99 +// } +// } +// } +// +// A conformant data set obeys the following conventions: +// - If a Feature K exists in one example with data type T, it must be of +// type T in all other examples when present. It may be omitted. +// - The number of instances of Feature K list data may vary across examples, +// depending on the requirements of the model. +// - If a Feature K doesn't exist in an example, a K-specific default will be +// used, if configured. +// - If a Feature K exists in an example but contains no items, the intent +// is considered to be an empty tensor and no default will be used. + +message Example { + Features features = 1; +}; + +// Example representing a ranking instance. +message RankingExample { + Features context = 1; + repeated Features positive = 2; + repeated Features negative = 3; +}; + +// Example representing a sequence. +// The context contains features which apply to the entire sequence. +// Each element in example represents an entry in the sequence. +message SequenceExample { + Features context = 1; + repeated Features features = 2; +}; + +// Example representing a list of feature maps. +// The context contains features which apply to all feature maps. +message InferenceExample { + Features context = 1; + repeated Features features = 2; +}; |