public static final class InputOuterClass.ExampleListWithContext.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder> implements InputOuterClass.ExampleListWithContextOrBuilder
Specifies one or more independent input Examples, with a common context
Example.
The common use case for context is to cleanly and optimally specify some
features that are common across multiple examples.
See example below with a search query as the context and multiple restaurants
to perform some inference on.
context: {
feature: {
key : "query"
value: {
bytes_list: {
value: [ "pizza" ]
}
}
}
}
examples: {
feature: {
key : "cuisine"
value: {
bytes_list: {
value: [ "Pizzeria" ]
}
}
}
}
examples: {
feature: {
key : "cuisine"
value: {
bytes_list: {
value: [ "Taqueria" ]
}
}
}
}
Implementations of ExampleListWithContext merge the context Example into each
of the Examples. Note that feature keys must not be duplicated between the
Examples and context Example, or the behavior is undefined.
See also:
tensorflow/core/example/example.proto
https://developers.google.com/protocol-buffers/docs/proto3#maps
Protobuf type tensorflow.serving.ExampleListWithContext| Modifier and Type | Method and Description |
|---|---|
InputOuterClass.ExampleListWithContext.Builder |
addAllExamples(java.lang.Iterable<? extends Example> values)
repeated .tensorflow.Example examples = 1; |
InputOuterClass.ExampleListWithContext.Builder |
addExamples(Example.Builder builderForValue)
repeated .tensorflow.Example examples = 1; |
InputOuterClass.ExampleListWithContext.Builder |
addExamples(Example value)
repeated .tensorflow.Example examples = 1; |
InputOuterClass.ExampleListWithContext.Builder |
addExamples(int index,
Example.Builder builderForValue)
repeated .tensorflow.Example examples = 1; |
InputOuterClass.ExampleListWithContext.Builder |
addExamples(int index,
Example value)
repeated .tensorflow.Example examples = 1; |
Example.Builder |
addExamplesBuilder()
repeated .tensorflow.Example examples = 1; |
Example.Builder |
addExamplesBuilder(int index)
repeated .tensorflow.Example examples = 1; |
InputOuterClass.ExampleListWithContext.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) |
InputOuterClass.ExampleListWithContext |
build() |
InputOuterClass.ExampleListWithContext |
buildPartial() |
InputOuterClass.ExampleListWithContext.Builder |
clear() |
InputOuterClass.ExampleListWithContext.Builder |
clearContext()
.tensorflow.Example context = 2; |
InputOuterClass.ExampleListWithContext.Builder |
clearExamples()
repeated .tensorflow.Example examples = 1; |
InputOuterClass.ExampleListWithContext.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
InputOuterClass.ExampleListWithContext.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
InputOuterClass.ExampleListWithContext.Builder |
clone() |
Example |
getContext()
.tensorflow.Example context = 2; |
Example.Builder |
getContextBuilder()
.tensorflow.Example context = 2; |
ExampleOrBuilder |
getContextOrBuilder()
.tensorflow.Example context = 2; |
InputOuterClass.ExampleListWithContext |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
Example |
getExamples(int index)
repeated .tensorflow.Example examples = 1; |
Example.Builder |
getExamplesBuilder(int index)
repeated .tensorflow.Example examples = 1; |
java.util.List<Example.Builder> |
getExamplesBuilderList()
repeated .tensorflow.Example examples = 1; |
int |
getExamplesCount()
repeated .tensorflow.Example examples = 1; |
java.util.List<Example> |
getExamplesList()
repeated .tensorflow.Example examples = 1; |
ExampleOrBuilder |
getExamplesOrBuilder(int index)
repeated .tensorflow.Example examples = 1; |
java.util.List<? extends ExampleOrBuilder> |
getExamplesOrBuilderList()
repeated .tensorflow.Example examples = 1; |
boolean |
hasContext()
.tensorflow.Example context = 2; |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
InputOuterClass.ExampleListWithContext.Builder |
mergeContext(Example value)
.tensorflow.Example context = 2; |
InputOuterClass.ExampleListWithContext.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
InputOuterClass.ExampleListWithContext.Builder |
mergeFrom(InputOuterClass.ExampleListWithContext other) |
InputOuterClass.ExampleListWithContext.Builder |
mergeFrom(com.google.protobuf.Message other) |
InputOuterClass.ExampleListWithContext.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
InputOuterClass.ExampleListWithContext.Builder |
removeExamples(int index)
repeated .tensorflow.Example examples = 1; |
InputOuterClass.ExampleListWithContext.Builder |
setContext(Example.Builder builderForValue)
.tensorflow.Example context = 2; |
InputOuterClass.ExampleListWithContext.Builder |
setContext(Example value)
.tensorflow.Example context = 2; |
InputOuterClass.ExampleListWithContext.Builder |
setExamples(int index,
Example.Builder builderForValue)
repeated .tensorflow.Example examples = 1; |
InputOuterClass.ExampleListWithContext.Builder |
setExamples(int index,
Example value)
repeated .tensorflow.Example examples = 1; |
InputOuterClass.ExampleListWithContext.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) |
InputOuterClass.ExampleListWithContext.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) |
InputOuterClass.ExampleListWithContext.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>public InputOuterClass.ExampleListWithContext.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>public InputOuterClass.ExampleListWithContext getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic InputOuterClass.ExampleListWithContext build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic InputOuterClass.ExampleListWithContext buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic InputOuterClass.ExampleListWithContext.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>public InputOuterClass.ExampleListWithContext.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>public InputOuterClass.ExampleListWithContext.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>public InputOuterClass.ExampleListWithContext.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>public InputOuterClass.ExampleListWithContext.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>public InputOuterClass.ExampleListWithContext.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>public InputOuterClass.ExampleListWithContext.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<InputOuterClass.ExampleListWithContext.Builder>public InputOuterClass.ExampleListWithContext.Builder mergeFrom(InputOuterClass.ExampleListWithContext other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>public InputOuterClass.ExampleListWithContext.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<InputOuterClass.ExampleListWithContext.Builder>java.io.IOExceptionpublic java.util.List<Example> getExamplesList()
repeated .tensorflow.Example examples = 1;getExamplesList in interface InputOuterClass.ExampleListWithContextOrBuilderpublic int getExamplesCount()
repeated .tensorflow.Example examples = 1;getExamplesCount in interface InputOuterClass.ExampleListWithContextOrBuilderpublic Example getExamples(int index)
repeated .tensorflow.Example examples = 1;getExamples in interface InputOuterClass.ExampleListWithContextOrBuilderpublic InputOuterClass.ExampleListWithContext.Builder setExamples(int index, Example value)
repeated .tensorflow.Example examples = 1;public InputOuterClass.ExampleListWithContext.Builder setExamples(int index, Example.Builder builderForValue)
repeated .tensorflow.Example examples = 1;public InputOuterClass.ExampleListWithContext.Builder addExamples(Example value)
repeated .tensorflow.Example examples = 1;public InputOuterClass.ExampleListWithContext.Builder addExamples(int index, Example value)
repeated .tensorflow.Example examples = 1;public InputOuterClass.ExampleListWithContext.Builder addExamples(Example.Builder builderForValue)
repeated .tensorflow.Example examples = 1;public InputOuterClass.ExampleListWithContext.Builder addExamples(int index, Example.Builder builderForValue)
repeated .tensorflow.Example examples = 1;public InputOuterClass.ExampleListWithContext.Builder addAllExamples(java.lang.Iterable<? extends Example> values)
repeated .tensorflow.Example examples = 1;public InputOuterClass.ExampleListWithContext.Builder clearExamples()
repeated .tensorflow.Example examples = 1;public InputOuterClass.ExampleListWithContext.Builder removeExamples(int index)
repeated .tensorflow.Example examples = 1;public Example.Builder getExamplesBuilder(int index)
repeated .tensorflow.Example examples = 1;public ExampleOrBuilder getExamplesOrBuilder(int index)
repeated .tensorflow.Example examples = 1;getExamplesOrBuilder in interface InputOuterClass.ExampleListWithContextOrBuilderpublic java.util.List<? extends ExampleOrBuilder> getExamplesOrBuilderList()
repeated .tensorflow.Example examples = 1;getExamplesOrBuilderList in interface InputOuterClass.ExampleListWithContextOrBuilderpublic Example.Builder addExamplesBuilder()
repeated .tensorflow.Example examples = 1;public Example.Builder addExamplesBuilder(int index)
repeated .tensorflow.Example examples = 1;public java.util.List<Example.Builder> getExamplesBuilderList()
repeated .tensorflow.Example examples = 1;public boolean hasContext()
.tensorflow.Example context = 2;hasContext in interface InputOuterClass.ExampleListWithContextOrBuilderpublic Example getContext()
.tensorflow.Example context = 2;getContext in interface InputOuterClass.ExampleListWithContextOrBuilderpublic InputOuterClass.ExampleListWithContext.Builder setContext(Example value)
.tensorflow.Example context = 2;public InputOuterClass.ExampleListWithContext.Builder setContext(Example.Builder builderForValue)
.tensorflow.Example context = 2;public InputOuterClass.ExampleListWithContext.Builder mergeContext(Example value)
.tensorflow.Example context = 2;public InputOuterClass.ExampleListWithContext.Builder clearContext()
.tensorflow.Example context = 2;public Example.Builder getContextBuilder()
.tensorflow.Example context = 2;public ExampleOrBuilder getContextOrBuilder()
.tensorflow.Example context = 2;getContextOrBuilder in interface InputOuterClass.ExampleListWithContextOrBuilderpublic final InputOuterClass.ExampleListWithContext.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>public final InputOuterClass.ExampleListWithContext.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>