blob: 194d1e7c242ca55ea722bcb4d32ab3989122923f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
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;
};
|