pub trait GradientTarget<T: Float, B: AutodiffBackend> {
// Required method
fn unnorm_logp(&self, position: Tensor<B, 1>) -> Tensor<B, 1>;
// Provided method
fn unnorm_logp_and_grad(
&self,
position: Tensor<B, 1>,
) -> (Tensor<B, 1>, Tensor<B, 1>) { ... }
}