primal And Gradient
fun primalAndGradient(x: DTensor, f: (DTensor) -> DScalar): Pair<DTensor, DTensor>
Content copied to clipboard
Reverse gradient for a function from DTensor to DTensor.
fun primalAndGradient(inputs: List<DTensor>, f: (List<DTensor>) -> DScalar): Pair<DScalar, List<DTensor>>
Content copied to clipboard
The Reverse gradients of a multivariate function.
fun primalAndGradient(x: DTensor, y: DTensor, f: (DTensor, DTensor) -> DScalar): Pair<DScalar, Pair<DTensor, DTensor>>
Content copied to clipboard
fun <Input : Any, InputTangent : Any> primalAndGradient(x: Input, f: (Input) -> DScalar, makeReverseInput: (Input, makeReverseTensor: (DTensor) -> DTensor) -> Input? = null, extractInputTangent: (Input, extractTensorTangent: (DTensor) -> DTensor) -> InputTangent): Pair<DScalar, InputTangent>
Content copied to clipboard