Class ApiDef
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
org.tensorflow.proto.ApiDef
- All Implemented Interfaces:
Message, MessageLite, MessageLiteOrBuilder, MessageOrBuilder, Serializable, ApiDefOrBuilder
Used to specify and override the default API & behavior in the generated code for client languages, from what you would get from the OpDef alone. There will be a set of ApiDefs that are common to all client languages, and another set per client language. The per-client-language ApiDefs will inherit values from the common ApiDefs which it can either replace or modify. We separate the API definition from the OpDef so we can evolve the API while remaining backwards compatible when interpreting old graphs. Overrides go in an "api_def.pbtxt" file with a text-format ApiDefs message. WARNING: Be *very* careful changing the API for any existing op -- you can change the semantics of existing code. These changes may need to wait until a major release of TensorFlow to avoid breaking our compatibility promises.Protobuf type
tensorflow.ApiDef- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classProtobuf typetensorflow.ApiDef.Argstatic interfacestatic final classDescription of the graph-construction-time configuration of this Op.static interfacestatic final classUsed to specify and override the default API & behavior in the generated code for client languages, from what you would get from the OpDef alone.static final classIf you specify any endpoint, this will replace all of the inherited endpoints.static interfacestatic enumProtobuf enumtensorflow.ApiDef.VisibilityNested classes/interfaces inherited from class GeneratedMessageV3
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType, BuilderType>, GeneratedMessageV3.ExtendableMessage<MessageType>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType>, GeneratedMessageV3.FieldAccessorTable, GeneratedMessageV3.UnusedPrivateParameterNested classes/interfaces inherited from class AbstractMessageLite
AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class AbstractMessage
memoizedSizeFields inherited from class AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleangetArgOrder(int index) List of original in_arg names to specify new argument order.getArgOrderBytes(int index) List of original in_arg names to specify new argument order.intList of original in_arg names to specify new argument order.List of original in_arg names to specify new argument order.getAttr(int index) repeated .tensorflow.ApiDef.Attr attr = 6;intrepeated .tensorflow.ApiDef.Attr attr = 6;repeated .tensorflow.ApiDef.Attr attr = 6;getAttrOrBuilder(int index) repeated .tensorflow.ApiDef.Attr attr = 6;List<? extends ApiDef.AttrOrBuilder> repeated .tensorflow.ApiDef.Attr attr = 6;static ApiDefIf this op is deprecated, set deprecation message to the message that should be logged when this op is used.If this op is deprecated, set deprecation message to the message that should be logged when this op is used.intMajor version when the op will be deleted.Additional, longer human-readable description of what the Op does.Additional, longer human-readable description of what the Op does.Modify an existing/inherited description by adding text to the beginning or end.Modify an existing/inherited description by adding text to the beginning or end.string description_suffix = 10;string description_suffix = 10;static final Descriptors.DescriptorgetEndpoint(int index) repeated .tensorflow.ApiDef.Endpoint endpoint = 3;intrepeated .tensorflow.ApiDef.Endpoint endpoint = 3;repeated .tensorflow.ApiDef.Endpoint endpoint = 3;getEndpointOrBuilder(int index) repeated .tensorflow.ApiDef.Endpoint endpoint = 3;List<? extends ApiDef.EndpointOrBuilder> repeated .tensorflow.ApiDef.Endpoint endpoint = 3;Name of the op (in the OpDef) to specify the API for.Name of the op (in the OpDef) to specify the API for.getInArg(int index) repeated .tensorflow.ApiDef.Arg in_arg = 4;intrepeated .tensorflow.ApiDef.Arg in_arg = 4;repeated .tensorflow.ApiDef.Arg in_arg = 4;getInArgOrBuilder(int index) repeated .tensorflow.ApiDef.Arg in_arg = 4;List<? extends ApiDef.ArgOrBuilder> repeated .tensorflow.ApiDef.Arg in_arg = 4;getOutArg(int index) repeated .tensorflow.ApiDef.Arg out_arg = 5;intrepeated .tensorflow.ApiDef.Arg out_arg = 5;repeated .tensorflow.ApiDef.Arg out_arg = 5;getOutArgOrBuilder(int index) repeated .tensorflow.ApiDef.Arg out_arg = 5;List<? extends ApiDef.ArgOrBuilder> repeated .tensorflow.ApiDef.Arg out_arg = 5;intOne-line human-readable description of what the Op does.One-line human-readable description of what the Op does.final UnknownFieldSet.tensorflow.ApiDef.Visibility visibility = 2;int.tensorflow.ApiDef.Visibility visibility = 2;inthashCode()protected GeneratedMessageV3.FieldAccessorTablefinal booleanstatic ApiDef.Builderstatic ApiDef.BuildernewBuilder(ApiDef prototype) protected ApiDef.Builderprotected Objectstatic ApiDefparseDelimitedFrom(InputStream input) static ApiDefparseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) static ApiDefparseFrom(byte[] data) static ApiDefparseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) static ApiDefparseFrom(ByteString data) static ApiDefparseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) static ApiDefparseFrom(CodedInputStream input) static ApiDefparseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) static ApiDefparseFrom(InputStream input) static ApiDefparseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) static ApiDefparseFrom(ByteBuffer data) static ApiDefparseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) parser()voidwriteTo(CodedOutputStream output) Methods inherited from class GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
-
Field Details
-
GRAPH_OP_NAME_FIELD_NUMBER
public static final int GRAPH_OP_NAME_FIELD_NUMBER- See Also:
-
DEPRECATION_MESSAGE_FIELD_NUMBER
public static final int DEPRECATION_MESSAGE_FIELD_NUMBER- See Also:
-
DEPRECATION_VERSION_FIELD_NUMBER
public static final int DEPRECATION_VERSION_FIELD_NUMBER- See Also:
-
VISIBILITY_FIELD_NUMBER
public static final int VISIBILITY_FIELD_NUMBER- See Also:
-
ENDPOINT_FIELD_NUMBER
public static final int ENDPOINT_FIELD_NUMBER- See Also:
-
IN_ARG_FIELD_NUMBER
public static final int IN_ARG_FIELD_NUMBER- See Also:
-
OUT_ARG_FIELD_NUMBER
public static final int OUT_ARG_FIELD_NUMBER- See Also:
-
ARG_ORDER_FIELD_NUMBER
public static final int ARG_ORDER_FIELD_NUMBER- See Also:
-
ATTR_FIELD_NUMBER
public static final int ATTR_FIELD_NUMBER- See Also:
-
SUMMARY_FIELD_NUMBER
public static final int SUMMARY_FIELD_NUMBER- See Also:
-
DESCRIPTION_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER- See Also:
-
DESCRIPTION_PREFIX_FIELD_NUMBER
public static final int DESCRIPTION_PREFIX_FIELD_NUMBER- See Also:
-
DESCRIPTION_SUFFIX_FIELD_NUMBER
public static final int DESCRIPTION_SUFFIX_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstancein classGeneratedMessageV3
-
getUnknownFields
- Specified by:
getUnknownFieldsin interfaceMessageOrBuilder- Overrides:
getUnknownFieldsin classGeneratedMessageV3
-
getDescriptor
-
internalGetFieldAccessorTable
- Specified by:
internalGetFieldAccessorTablein classGeneratedMessageV3
-
getGraphOpName
Name of the op (in the OpDef) to specify the API for.
string graph_op_name = 1;- Specified by:
getGraphOpNamein interfaceApiDefOrBuilder- Returns:
- The graphOpName.
-
getGraphOpNameBytes
Name of the op (in the OpDef) to specify the API for.
string graph_op_name = 1;- Specified by:
getGraphOpNameBytesin interfaceApiDefOrBuilder- Returns:
- The bytes for graphOpName.
-
getDeprecationMessage
If this op is deprecated, set deprecation message to the message that should be logged when this op is used. The message should indicate alternative op to use, if any.
string deprecation_message = 12;- Specified by:
getDeprecationMessagein interfaceApiDefOrBuilder- Returns:
- The deprecationMessage.
-
getDeprecationMessageBytes
If this op is deprecated, set deprecation message to the message that should be logged when this op is used. The message should indicate alternative op to use, if any.
string deprecation_message = 12;- Specified by:
getDeprecationMessageBytesin interfaceApiDefOrBuilder- Returns:
- The bytes for deprecationMessage.
-
getDeprecationVersion
public int getDeprecationVersion()Major version when the op will be deleted. For e.g. set this value to 2 if op API should be removed in TensorFlow 2.0 and deprecated in versions before that.
int32 deprecation_version = 13;- Specified by:
getDeprecationVersionin interfaceApiDefOrBuilder- Returns:
- The deprecationVersion.
-
getVisibilityValue
public int getVisibilityValue().tensorflow.ApiDef.Visibility visibility = 2;- Specified by:
getVisibilityValuein interfaceApiDefOrBuilder- Returns:
- The enum numeric value on the wire for visibility.
-
getVisibility
.tensorflow.ApiDef.Visibility visibility = 2;- Specified by:
getVisibilityin interfaceApiDefOrBuilder- Returns:
- The visibility.
-
getEndpointList
repeated .tensorflow.ApiDef.Endpoint endpoint = 3;- Specified by:
getEndpointListin interfaceApiDefOrBuilder
-
getEndpointOrBuilderList
repeated .tensorflow.ApiDef.Endpoint endpoint = 3;- Specified by:
getEndpointOrBuilderListin interfaceApiDefOrBuilder
-
getEndpointCount
public int getEndpointCount()repeated .tensorflow.ApiDef.Endpoint endpoint = 3;- Specified by:
getEndpointCountin interfaceApiDefOrBuilder
-
getEndpoint
repeated .tensorflow.ApiDef.Endpoint endpoint = 3;- Specified by:
getEndpointin interfaceApiDefOrBuilder
-
getEndpointOrBuilder
repeated .tensorflow.ApiDef.Endpoint endpoint = 3;- Specified by:
getEndpointOrBuilderin interfaceApiDefOrBuilder
-
getInArgList
repeated .tensorflow.ApiDef.Arg in_arg = 4;- Specified by:
getInArgListin interfaceApiDefOrBuilder
-
getInArgOrBuilderList
repeated .tensorflow.ApiDef.Arg in_arg = 4;- Specified by:
getInArgOrBuilderListin interfaceApiDefOrBuilder
-
getInArgCount
public int getInArgCount()repeated .tensorflow.ApiDef.Arg in_arg = 4;- Specified by:
getInArgCountin interfaceApiDefOrBuilder
-
getInArg
repeated .tensorflow.ApiDef.Arg in_arg = 4;- Specified by:
getInArgin interfaceApiDefOrBuilder
-
getInArgOrBuilder
repeated .tensorflow.ApiDef.Arg in_arg = 4;- Specified by:
getInArgOrBuilderin interfaceApiDefOrBuilder
-
getOutArgList
repeated .tensorflow.ApiDef.Arg out_arg = 5;- Specified by:
getOutArgListin interfaceApiDefOrBuilder
-
getOutArgOrBuilderList
repeated .tensorflow.ApiDef.Arg out_arg = 5;- Specified by:
getOutArgOrBuilderListin interfaceApiDefOrBuilder
-
getOutArgCount
public int getOutArgCount()repeated .tensorflow.ApiDef.Arg out_arg = 5;- Specified by:
getOutArgCountin interfaceApiDefOrBuilder
-
getOutArg
repeated .tensorflow.ApiDef.Arg out_arg = 5;- Specified by:
getOutArgin interfaceApiDefOrBuilder
-
getOutArgOrBuilder
repeated .tensorflow.ApiDef.Arg out_arg = 5;- Specified by:
getOutArgOrBuilderin interfaceApiDefOrBuilder
-
getArgOrderList
List of original in_arg names to specify new argument order. Length of arg_order should be either empty to keep current order or match size of in_arg.
repeated string arg_order = 11;- Specified by:
getArgOrderListin interfaceApiDefOrBuilder- Returns:
- A list containing the argOrder.
-
getArgOrderCount
public int getArgOrderCount()List of original in_arg names to specify new argument order. Length of arg_order should be either empty to keep current order or match size of in_arg.
repeated string arg_order = 11;- Specified by:
getArgOrderCountin interfaceApiDefOrBuilder- Returns:
- The count of argOrder.
-
getArgOrder
List of original in_arg names to specify new argument order. Length of arg_order should be either empty to keep current order or match size of in_arg.
repeated string arg_order = 11;- Specified by:
getArgOrderin interfaceApiDefOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The argOrder at the given index.
-
getArgOrderBytes
List of original in_arg names to specify new argument order. Length of arg_order should be either empty to keep current order or match size of in_arg.
repeated string arg_order = 11;- Specified by:
getArgOrderBytesin interfaceApiDefOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the argOrder at the given index.
-
getAttrList
repeated .tensorflow.ApiDef.Attr attr = 6;- Specified by:
getAttrListin interfaceApiDefOrBuilder
-
getAttrOrBuilderList
repeated .tensorflow.ApiDef.Attr attr = 6;- Specified by:
getAttrOrBuilderListin interfaceApiDefOrBuilder
-
getAttrCount
public int getAttrCount()repeated .tensorflow.ApiDef.Attr attr = 6;- Specified by:
getAttrCountin interfaceApiDefOrBuilder
-
getAttr
repeated .tensorflow.ApiDef.Attr attr = 6;- Specified by:
getAttrin interfaceApiDefOrBuilder
-
getAttrOrBuilder
repeated .tensorflow.ApiDef.Attr attr = 6;- Specified by:
getAttrOrBuilderin interfaceApiDefOrBuilder
-
getSummary
One-line human-readable description of what the Op does.
string summary = 7;- Specified by:
getSummaryin interfaceApiDefOrBuilder- Returns:
- The summary.
-
getSummaryBytes
One-line human-readable description of what the Op does.
string summary = 7;- Specified by:
getSummaryBytesin interfaceApiDefOrBuilder- Returns:
- The bytes for summary.
-
getDescription
Additional, longer human-readable description of what the Op does.
string description = 8;- Specified by:
getDescriptionin interfaceApiDefOrBuilder- Returns:
- The description.
-
getDescriptionBytes
Additional, longer human-readable description of what the Op does.
string description = 8;- Specified by:
getDescriptionBytesin interfaceApiDefOrBuilder- Returns:
- The bytes for description.
-
getDescriptionPrefix
Modify an existing/inherited description by adding text to the beginning or end.
string description_prefix = 9;- Specified by:
getDescriptionPrefixin interfaceApiDefOrBuilder- Returns:
- The descriptionPrefix.
-
getDescriptionPrefixBytes
Modify an existing/inherited description by adding text to the beginning or end.
string description_prefix = 9;- Specified by:
getDescriptionPrefixBytesin interfaceApiDefOrBuilder- Returns:
- The bytes for descriptionPrefix.
-
getDescriptionSuffix
string description_suffix = 10;- Specified by:
getDescriptionSuffixin interfaceApiDefOrBuilder- Returns:
- The descriptionSuffix.
-
getDescriptionSuffixBytes
string description_suffix = 10;- Specified by:
getDescriptionSuffixBytesin interfaceApiDefOrBuilder- Returns:
- The bytes for descriptionSuffix.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfaceMessageLiteOrBuilder- Overrides:
isInitializedin classGeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfaceMessageLite- Overrides:
writeToin classGeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfaceMessageLite- Overrides:
getSerializedSizein classGeneratedMessageV3
-
equals
- Specified by:
equalsin interfaceMessage- Overrides:
equalsin classAbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceMessage- Overrides:
hashCodein classAbstractMessage
-
parseFrom
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static ApiDef parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static ApiDef parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static ApiDef parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static ApiDef parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static ApiDef parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static ApiDef parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfaceMessage- Specified by:
newBuilderForTypein interfaceMessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfaceMessage- Specified by:
toBuilderin interfaceMessageLite
-
newBuilderForType
- Specified by:
newBuilderForTypein classGeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfaceMessage- Specified by:
getParserForTypein interfaceMessageLite- Overrides:
getParserForTypein classGeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfaceMessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfaceMessageOrBuilder
-