piglot.objective.Composition
- class Composition[source]
Bases:
ABCAbstract class for defining composition functionals with gradients
Methods
Abstract method for computing the outer function of the composition
Abstract method for computing the outer function of the composition with gradients
- composition(inner: ndarray, params: ndarray) ndarray[source]
Abstract method for computing the outer function of the composition
Parameters
- innernp.ndarray
Return value from the inner function
- paramsnp.ndarray
Parameters for the given responses
Returns
- np.ndarray
Composition result
- abstract composition_torch(inner: Tensor, params: Tensor) Tensor[source]
Abstract method for computing the outer function of the composition with gradients
Parameters
- innertorch.Tensor
Return value from the inner function
- paramstorch.Tensor
Parameters for the given responses
Returns
- torch.Tensor
Composition result