Class GraphNode<T>
java.lang.Object
org.episteme.core.mathematics.ml.neural.autograd.GraphNode<T>
- All Implemented Interfaces:
Serializable
Represents a node in the computation graph for Automatic Differentiation.
Nodes wrap Tensors and track the operation history to allow for reverse-mode automatic differentiation (backpropagation).
- Since:
- 2.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFunctional interface for the backward pass of an operation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionElement-wise addition.voidbackward()Triggers reverse-mode automatic differentiation.broadcast(int... shape) Broadcasts the node to a new shape.getData()getGrad()log()Natural logarithm.Matrix multiplication (supports multidimensional tensors via einsum).mean()Arithmetic mean of all elements.Element-wise multiplication (Hadamard product).negate()Element-wise negation.relu()Rectified Linear Unit (ReLU).booleanscale(double factor) Scale by a scalar factor.voidvoidsigmoid()Sigmoid activation function.Element-wise subtraction.sum()Sum of all elements in the tensor.toString()
-
Constructor Details
-
GraphNode
-
GraphNode
-
GraphNode
-
-
Method Details
-
backward
public void backward()Triggers reverse-mode automatic differentiation. Computes the gradient of this node with respect to all its ancestors. -
getData
-
getGrad
-
setGrad
-
requiresGrad
public boolean requiresGrad() -
add
-
multiply
-
matmul
-
negate
-
subtract
-
relu
-
sigmoid
-
log
-
sum
-
scale
-
mean
-
setData
-
broadcast
-
toString
-