Class GradientDef
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
org.tensorflow.proto.GradientDef
- All Implemented Interfaces:
Message, MessageLite, MessageLiteOrBuilder, MessageOrBuilder, Serializable, GradientDefOrBuilder
GradientDef defines the gradient function of a function defined in a function library. A gradient function g (specified by gradient_func) for a function f (specified by function_name) must follow the following: The function 'f' must be a numerical function which takes N inputs and produces M outputs. Its gradient function 'g', which is a function taking N + M inputs and produces N outputs. I.e. if we have (y1, y2, ..., y_M) = f(x1, x2, ..., x_N), then, g is (dL/dx1, dL/dx2, ..., dL/dx_N) = g(x1, x2, ..., x_N, dL/dy1, dL/dy2, ..., dL/dy_M), where L is a scalar-value function of (x1, x2, ..., xN) (e.g., the loss function). dL/dx_i is the partial derivative of L with respect to x_i.Protobuf type
tensorflow.GradientDef- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classGradientDef defines the gradient function of a function defined in a function library.Nested classes/interfaces inherited from class GeneratedMessage
GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>, GeneratedMessage.ExtendableMessage<MessageT>, GeneratedMessage.ExtendableMessageOrBuilder<MessageT>, GeneratedMessage.FieldAccessorTable, GeneratedMessage.GeneratedExtension<ContainingT, T>, GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class AbstractMessage
AbstractMessage.BuilderParentNested classes/interfaces inherited from class AbstractMessageLite
AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intFields inherited from class GeneratedMessage
alwaysUseFieldBuilders, unknownFieldsFields inherited from class AbstractMessage
memoizedSizeFields inherited from class AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic GradientDefstatic final Descriptors.DescriptorThe function name.The function name.The gradient function's name.The gradient function's name.intinthashCode()protected GeneratedMessage.FieldAccessorTablefinal booleanstatic GradientDef.Builderstatic GradientDef.BuildernewBuilder(GradientDef prototype) protected GradientDef.Builderstatic GradientDefparseDelimitedFrom(InputStream input) static GradientDefparseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) static GradientDefparseFrom(byte[] data) static GradientDefparseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) static GradientDefparseFrom(ByteString data) static GradientDefparseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) static GradientDefparseFrom(CodedInputStream input) static GradientDefparseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) static GradientDefparseFrom(InputStream input) static GradientDefparseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) static GradientDefparseFrom(ByteBuffer data) static GradientDefparseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) static Parser<GradientDef> parser()voidwriteTo(CodedOutputStream output) Methods inherited from class GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Field Details
-
FUNCTION_NAME_FIELD_NUMBER
public static final int FUNCTION_NAME_FIELD_NUMBER- See Also:
-
GRADIENT_FUNC_FIELD_NUMBER
public static final int GRADIENT_FUNC_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
-
internalGetFieldAccessorTable
- Specified by:
internalGetFieldAccessorTablein classGeneratedMessage
-
getFunctionName
The function name.
string function_name = 1;- Specified by:
getFunctionNamein interfaceGradientDefOrBuilder- Returns:
- The functionName.
-
getFunctionNameBytes
The function name.
string function_name = 1;- Specified by:
getFunctionNameBytesin interfaceGradientDefOrBuilder- Returns:
- The bytes for functionName.
-
getGradientFunc
The gradient function's name.
string gradient_func = 2;- Specified by:
getGradientFuncin interfaceGradientDefOrBuilder- Returns:
- The gradientFunc.
-
getGradientFuncBytes
The gradient function's name.
string gradient_func = 2;- Specified by:
getGradientFuncBytesin interfaceGradientDefOrBuilder- Returns:
- The bytes for gradientFunc.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfaceMessageLiteOrBuilder- Overrides:
isInitializedin classGeneratedMessage
-
writeTo
- Specified by:
writeToin interfaceMessageLite- Overrides:
writeToin classGeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfaceMessageLite- Overrides:
getSerializedSizein classGeneratedMessage
-
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 GradientDef parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static GradientDef parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static GradientDef parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static GradientDef parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static GradientDef parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static GradientDef 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
- Overrides:
newBuilderForTypein classAbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfaceMessage- Specified by:
getParserForTypein interfaceMessageLite- Overrides:
getParserForTypein classGeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfaceMessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfaceMessageOrBuilder
-