Package org.tensorflow.framework
Class OpDef
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
org.tensorflow.framework.OpDef
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable,OpDefOrBuilder
Defines an operation. A NodeDef in a GraphDef specifies an Op by using the "op" field which should match the name of a OpDef. LINT.IfChangeProtobuf type
tensorflow.OpDef- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classFor describing inputs and outputs.static interfacestatic final classDescription of the graph-construction-time configuration of this Op.static interfacestatic final classDefines an operation.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.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 com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanBy default, all inputs to an Op must be initialized Tensors.getAttr(int index) repeated .tensorflow.OpDef.AttrDef attr = 4;intrepeated .tensorflow.OpDef.AttrDef attr = 4;repeated .tensorflow.OpDef.AttrDef attr = 4;getAttrOrBuilder(int index) repeated .tensorflow.OpDef.AttrDef attr = 4;List<? extends OpDef.AttrDefOrBuilder> repeated .tensorflow.OpDef.AttrDef attr = 4;getControlOutput(int index) Named control outputs for this operation.com.google.protobuf.ByteStringgetControlOutputBytes(int index) Named control outputs for this operation.intNamed control outputs for this operation.com.google.protobuf.ProtocolStringListNamed control outputs for this operation.static OpDefOptional deprecation based on GraphDef versions.Optional deprecation based on GraphDef versions.Additional, longer human-readable description of what the Op does.com.google.protobuf.ByteStringAdditional, longer human-readable description of what the Op does.static final com.google.protobuf.Descriptors.DescriptorgetInputArg(int index) Description of the input(s).intDescription of the input(s).Description of the input(s).getInputArgOrBuilder(int index) Description of the input(s).List<? extends OpDef.ArgDefOrBuilder> Description of the input(s).booleanIf is_aggregate is true, then this operation accepts N >= 2 inputs and produces 1 output all of the same type.booleanTrue if the operation is commutative ("op(a,b) == op(b,a)" for all inputs)booleanIndicates whether the op implementation uses distributed communication.booleanOps are marked as stateful if their behavior depends on some state beyond their input tensors (e.g. variable reading op) or if they have a side-effect (e.g. printing or asserting ops).getName()Op names starting with an underscore are reserved for internal use.com.google.protobuf.ByteStringOp names starting with an underscore are reserved for internal use.getOutputArg(int index) Description of the output(s).intDescription of the output(s).Description of the output(s).getOutputArgOrBuilder(int index) Description of the output(s).List<? extends OpDef.ArgDefOrBuilder> Description of the output(s).com.google.protobuf.Parser<OpDef> intOne-line human-readable description of what the Op does.com.google.protobuf.ByteStringOne-line human-readable description of what the Op does.booleanOptional deprecation based on GraphDef versions.inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanstatic OpDef.Builderstatic OpDef.BuildernewBuilder(OpDef prototype) protected OpDef.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static OpDefparseDelimitedFrom(InputStream input) static OpDefparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static OpDefparseFrom(byte[] data) static OpDefparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static OpDefparseFrom(com.google.protobuf.ByteString data) static OpDefparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static OpDefparseFrom(com.google.protobuf.CodedInputStream input) static OpDefparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static OpDefparseFrom(InputStream input) static OpDefparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static OpDefparseFrom(ByteBuffer data) static OpDefparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<OpDef> parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, 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 com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER- See Also:
-
INPUT_ARG_FIELD_NUMBER
public static final int INPUT_ARG_FIELD_NUMBER- See Also:
-
OUTPUT_ARG_FIELD_NUMBER
public static final int OUTPUT_ARG_FIELD_NUMBER- See Also:
-
CONTROL_OUTPUT_FIELD_NUMBER
public static final int CONTROL_OUTPUT_FIELD_NUMBER- See Also:
-
ATTR_FIELD_NUMBER
public static final int ATTR_FIELD_NUMBER- See Also:
-
DEPRECATION_FIELD_NUMBER
public static final int DEPRECATION_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:
-
IS_COMMUTATIVE_FIELD_NUMBER
public static final int IS_COMMUTATIVE_FIELD_NUMBER- See Also:
-
IS_AGGREGATE_FIELD_NUMBER
public static final int IS_AGGREGATE_FIELD_NUMBER- See Also:
-
IS_STATEFUL_FIELD_NUMBER
public static final int IS_STATEFUL_FIELD_NUMBER- See Also:
-
ALLOWS_UNINITIALIZED_INPUT_FIELD_NUMBER
public static final int ALLOWS_UNINITIALIZED_INPUT_FIELD_NUMBER- See Also:
-
IS_DISTRIBUTED_COMMUNICATION_FIELD_NUMBER
public static final int IS_DISTRIBUTED_COMMUNICATION_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getName
Op names starting with an underscore are reserved for internal use. Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9>_]*".
string name = 1;- Specified by:
getNamein interfaceOpDefOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()Op names starting with an underscore are reserved for internal use. Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9>_]*".
string name = 1;- Specified by:
getNameBytesin interfaceOpDefOrBuilder- Returns:
- The bytes for name.
-
getInputArgList
Description of the input(s).
repeated .tensorflow.OpDef.ArgDef input_arg = 2;- Specified by:
getInputArgListin interfaceOpDefOrBuilder
-
getInputArgOrBuilderList
Description of the input(s).
repeated .tensorflow.OpDef.ArgDef input_arg = 2;- Specified by:
getInputArgOrBuilderListin interfaceOpDefOrBuilder
-
getInputArgCount
public int getInputArgCount()Description of the input(s).
repeated .tensorflow.OpDef.ArgDef input_arg = 2;- Specified by:
getInputArgCountin interfaceOpDefOrBuilder
-
getInputArg
Description of the input(s).
repeated .tensorflow.OpDef.ArgDef input_arg = 2;- Specified by:
getInputArgin interfaceOpDefOrBuilder
-
getInputArgOrBuilder
Description of the input(s).
repeated .tensorflow.OpDef.ArgDef input_arg = 2;- Specified by:
getInputArgOrBuilderin interfaceOpDefOrBuilder
-
getOutputArgList
Description of the output(s).
repeated .tensorflow.OpDef.ArgDef output_arg = 3;- Specified by:
getOutputArgListin interfaceOpDefOrBuilder
-
getOutputArgOrBuilderList
Description of the output(s).
repeated .tensorflow.OpDef.ArgDef output_arg = 3;- Specified by:
getOutputArgOrBuilderListin interfaceOpDefOrBuilder
-
getOutputArgCount
public int getOutputArgCount()Description of the output(s).
repeated .tensorflow.OpDef.ArgDef output_arg = 3;- Specified by:
getOutputArgCountin interfaceOpDefOrBuilder
-
getOutputArg
Description of the output(s).
repeated .tensorflow.OpDef.ArgDef output_arg = 3;- Specified by:
getOutputArgin interfaceOpDefOrBuilder
-
getOutputArgOrBuilder
Description of the output(s).
repeated .tensorflow.OpDef.ArgDef output_arg = 3;- Specified by:
getOutputArgOrBuilderin interfaceOpDefOrBuilder
-
getControlOutputList
public com.google.protobuf.ProtocolStringList getControlOutputList()Named control outputs for this operation. Useful only for composite operations (i.e. functions) which want to name different control outputs.
repeated string control_output = 20;- Specified by:
getControlOutputListin interfaceOpDefOrBuilder- Returns:
- A list containing the controlOutput.
-
getControlOutputCount
public int getControlOutputCount()Named control outputs for this operation. Useful only for composite operations (i.e. functions) which want to name different control outputs.
repeated string control_output = 20;- Specified by:
getControlOutputCountin interfaceOpDefOrBuilder- Returns:
- The count of controlOutput.
-
getControlOutput
Named control outputs for this operation. Useful only for composite operations (i.e. functions) which want to name different control outputs.
repeated string control_output = 20;- Specified by:
getControlOutputin interfaceOpDefOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The controlOutput at the given index.
-
getControlOutputBytes
public com.google.protobuf.ByteString getControlOutputBytes(int index) Named control outputs for this operation. Useful only for composite operations (i.e. functions) which want to name different control outputs.
repeated string control_output = 20;- Specified by:
getControlOutputBytesin interfaceOpDefOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the controlOutput at the given index.
-
getAttrList
repeated .tensorflow.OpDef.AttrDef attr = 4;- Specified by:
getAttrListin interfaceOpDefOrBuilder
-
getAttrOrBuilderList
repeated .tensorflow.OpDef.AttrDef attr = 4;- Specified by:
getAttrOrBuilderListin interfaceOpDefOrBuilder
-
getAttrCount
public int getAttrCount()repeated .tensorflow.OpDef.AttrDef attr = 4;- Specified by:
getAttrCountin interfaceOpDefOrBuilder
-
getAttr
repeated .tensorflow.OpDef.AttrDef attr = 4;- Specified by:
getAttrin interfaceOpDefOrBuilder
-
getAttrOrBuilder
repeated .tensorflow.OpDef.AttrDef attr = 4;- Specified by:
getAttrOrBuilderin interfaceOpDefOrBuilder
-
hasDeprecation
public boolean hasDeprecation()Optional deprecation based on GraphDef versions.
.tensorflow.OpDeprecation deprecation = 8;- Specified by:
hasDeprecationin interfaceOpDefOrBuilder- Returns:
- Whether the deprecation field is set.
-
getDeprecation
Optional deprecation based on GraphDef versions.
.tensorflow.OpDeprecation deprecation = 8;- Specified by:
getDeprecationin interfaceOpDefOrBuilder- Returns:
- The deprecation.
-
getDeprecationOrBuilder
Optional deprecation based on GraphDef versions.
.tensorflow.OpDeprecation deprecation = 8;- Specified by:
getDeprecationOrBuilderin interfaceOpDefOrBuilder
-
getSummary
One-line human-readable description of what the Op does.
string summary = 5;- Specified by:
getSummaryin interfaceOpDefOrBuilder- Returns:
- The summary.
-
getSummaryBytes
public com.google.protobuf.ByteString getSummaryBytes()One-line human-readable description of what the Op does.
string summary = 5;- Specified by:
getSummaryBytesin interfaceOpDefOrBuilder- Returns:
- The bytes for summary.
-
getDescription
Additional, longer human-readable description of what the Op does.
string description = 6;- Specified by:
getDescriptionin interfaceOpDefOrBuilder- Returns:
- The description.
-
getDescriptionBytes
public com.google.protobuf.ByteString getDescriptionBytes()Additional, longer human-readable description of what the Op does.
string description = 6;- Specified by:
getDescriptionBytesin interfaceOpDefOrBuilder- Returns:
- The bytes for description.
-
getIsCommutative
public boolean getIsCommutative()True if the operation is commutative ("op(a,b) == op(b,a)" for all inputs)bool is_commutative = 18;- Specified by:
getIsCommutativein interfaceOpDefOrBuilder- Returns:
- The isCommutative.
-
getIsAggregate
public boolean getIsAggregate()If is_aggregate is true, then this operation accepts N >= 2 inputs and produces 1 output all of the same type. Should be associative and commutative, and produce output with the same shape as the input. The optimizer may replace an aggregate op taking input from multiple devices with a tree of aggregate ops that aggregate locally within each device (and possibly within groups of nearby devices) before communicating. TODO(josh11b): Implement that optimization.
bool is_aggregate = 16;- Specified by:
getIsAggregatein interfaceOpDefOrBuilder- Returns:
- The isAggregate.
-
getIsStateful
public boolean getIsStateful()Ops are marked as stateful if their behavior depends on some state beyond their input tensors (e.g. variable reading op) or if they have a side-effect (e.g. printing or asserting ops). Equivalently, stateless ops must always produce the same output for the same input and have no side-effects. By default Ops may be moved between devices. Stateful ops should either not be moved, or should only be moved if that state can also be moved (e.g. via some sort of save / restore). Stateful ops are guaranteed to never be optimized away by Common Subexpression Elimination (CSE).
bool is_stateful = 17;- Specified by:
getIsStatefulin interfaceOpDefOrBuilder- Returns:
- The isStateful.
-
getAllowsUninitializedInput
public boolean getAllowsUninitializedInput()By default, all inputs to an Op must be initialized Tensors. Ops that may initialize tensors for the first time should set this field to true, to allow the Op to take an uninitialized Tensor as input.
bool allows_uninitialized_input = 19;- Specified by:
getAllowsUninitializedInputin interfaceOpDefOrBuilder- Returns:
- The allowsUninitializedInput.
-
getIsDistributedCommunication
public boolean getIsDistributedCommunication()Indicates whether the op implementation uses distributed communication. If True, the op is allowed to return errors for network disconnection and trigger TF network failure handling logics.
bool is_distributed_communication = 21;- Specified by:
getIsDistributedCommunicationin interfaceOpDefOrBuilder- Returns:
- The isDistributedCommunication.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static OpDef parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static OpDef parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static OpDef parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static OpDef parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static OpDef parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static OpDef parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static OpDef parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static OpDef parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static OpDef parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected OpDef.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-