MAELoss
Computes the Mean Absolute Error (MAE) loss.
Value parameters
- pred
-
the prediction variable.
- target
-
the target variable.
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Functionclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Backward pass: propagates the gradient using the sign of (pred-target).
Backward pass: propagates the gradient using the sign of (pred-target).
Value parameters
- gradOutput
-
the upstream gradient.
Attributes
- Definition Classes
Inherited methods
Map of attributes for visualization/debugging (default: empty).
Backpropagates gradients for functions with two inputs.
Backpropagates gradients for functions with two inputs.
Value parameters
- computeGrad1
-
function to compute the gradient for v1.
- computeGrad2
-
function to compute the gradient for v2.
- gradOutput
-
the upstream gradient tensor.
- v1
-
the first input variable.
- v2
-
the second input variable.
Attributes
- Inherited from:
- Function
Returns the input variables to this Function. This works automatically for all case-class ops by iterating over their constructor fields and collecting those of type Variabl.
Returns the input variables to this Function. This works automatically for all case-class ops by iterating over their constructor fields and collecting those of type Variabl.
Attributes
- See also
-
Case classes and Product: https://scala-lang.org/api/3.x/scala/Product.html
- Inherited from:
- Function
Human-readable name of this op (defaults to simple class name).
An iterator over the names of all the elements of this product.
An iterator over the names of all the elements of this product.
Attributes
- Inherited from:
- Product
An iterator over all the elements of this product.
An iterator over all the elements of this product.
Attributes
- Returns
-
in the default implementation, an
Iterator[Any] - Inherited from:
- Product
Unbroadcasts a tensor to a given shape by summing across reduced dimensions.
Unbroadcasts a tensor to a given shape by summing across reduced dimensions.
Value parameters
- data
-
the tensor data.
- oldShape
-
the original shape.
Attributes
- Returns
-
a TensorD with shape adjusted to oldShape.
- Throws
-
Exception
if unbroadcasting is not feasible.
- Inherited from:
- Function
Unbroadcasts a variable's tensor data to a specified old shape.
Unbroadcasts a variable's tensor data to a specified old shape.
Value parameters
- oldShape
-
the target shape.
- v
-
the variable to unbroadcast.
Attributes
- Returns
-
a new Variabl with data unbroadcasted.
- Inherited from:
- Function