Home | History | Annotate | Download | only in example

Lines Matching defs:feature

16 // A set of lightweight wrappers which simplify access to Feature protos.
20 // So accessing feature values is not very convenient.
22 // For example, to read a first value of integer feature "tag":
23 // int id = example.features().feature().at("tag").int64_list().value(0)
39 // To copy multiple values into a feature:
46 // NOTE: Due to the nature of oneof proto fields setting a feature of one type
47 // automatically clears all values stored as another type with the same feature
62 // This will create a feature list keyed as "images" with two features:
67 // feature { float_list { value: [4.0] } }
68 // feature { float_list { value: [5.0, 3.0] } }
74 // Returns true if a feature with the specified key, and optionally
81 // GetFeatureList(key, sequence_example) -> RepeatedPtrField<Feature>
82 // Returns Feature protos associated with a key.
83 // AppendFeatureValues(begin, end, feature)
84 // AppendFeatureValues(container or initializer_list, feature)
85 // Copies values into a Feature.
94 // GetFeature(key, proto) -> Feature*
95 // Returns a Feature proto for the specified key, creates a new if
97 // GetFeatureValues<FeatureType>(feature) -> RepeatedField<FeatureType>
98 // Returns values of the feature for the FeatureType.
107 #include "tensorflow/core/example/feature.pb.h"
118 // Returns a reference to a feature corresponding to the name.
119 // Note: it will create a new Feature if it is missing in the example.
120 Feature& ExampleFeature(const string& name, Example* example);
123 // corresponding to a selected feature type.
142 // Specializations of FeatureTrait define a type of feature corresponding to a
194 // repeated field of feature values.
197 GetFeatureValues(const Feature& feature);
199 // Returns a read only repeated field corresponding to a feature with the
204 return GetFeatureValues<FeatureType>(GetFeatures(proto).feature().at(key));
207 // Returns a mutable repeated field of a feature values.
210 Feature* feature);
212 // Returns a mutable repeated field corresponding to a feature with the
217 ::tensorflow::Feature& feature =
219 return GetFeatureValues<FeatureType>(&feature);
222 // Returns a Feature proto for the specified key, creates a new if necessary.
225 Feature* GetFeature(const string& key, ProtoType* proto) {
230 const protobuf::RepeatedPtrField<Feature>& GetFeatureList(
235 protobuf::RepeatedPtrField<Feature>* GetFeatureList(
240 Feature* feature) {
245 GetFeatureValues<FeatureType>(feature)));
250 Feature* feature) {
251 AppendFeatureValues(container.begin(), container.end(), feature);
255 void AppendFeatureValues(const ContainerType& container, Feature* feature) {
258 feature);
261 // Copies elements from the range, defined by [first, last) into the feature
269 // Copies all elements from the container into a feature.
278 // Copies all elements from the initializer list into a Feature contained by
289 // Returns true if a feature with the specified key belongs to the Features.
292 // the function will not check the feature type. Otherwise it will return false
293 // if the feature has a wrong type.
297 // Returns true if a feature with the specified key belongs to the Example.
298 // Doesn't check feature type if used without FeatureType, otherwise the
299 // specialized versions return false if the feature has a wrong type.