Class Identity<T extends TFloating>
java.lang.Object
org.tensorflow.framework.initializers.BaseInitializer<T>
org.tensorflow.framework.initializers.Identity<T>
- Type Parameters:
T- The TType for the call operation
- All Implemented Interfaces:
Initializer<T>
Initializer that generates the identity matrix.
Only usable for generating 2D matrices.
Examples:
Identity<TFloat32> initializer =
new org.tensorflow.framework.initializers.Identity<>(tf);
Operand<TFloat32> values =
initializer.call(Ops tf, tf.constant(Shape.of(2,2)), TFloat32.class);
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class BaseInitializer
getName
-
Field Details
-
GAIN_DEFAULT
public static final double GAIN_DEFAULT- See Also:
-
-
Constructor Details
-
Identity
public Identity()Creates an Initializer that generates the identity matrix. -
Identity
public Identity(double gain) Creates an Initializer that generates the identity matrix.- Parameters:
gain- the gain to be applied to the Identity Matrix
-
-
Method Details
-
call
-