Function burn::backend::autodiff::ops::unary_different_backend
pub fn unary_different_backend<BIn, BOut, F>(
parents: [Option<Arc<Node>>; 1],
node: Arc<Node>,
grads: &mut Gradients,
func: F,
)where
BIn: Backend,
BOut: Backend,
F: FnOnce(<BOut as Backend>::FloatTensorPrimitive) -> <BIn as Backend>::FloatTensorPrimitive,
Expand description
Execute a unary operation during the backward step where the input backend is different from the output backend.