pub fn unary<B, F>(
parents: [Option<Arc<Node>>; 1],
node: Arc<Node>,
grads: &mut Gradients,
func: F,
)where
B: Backend,
F: FnOnce(<B as Backend>::FloatTensorPrimitive) -> <B as Backend>::FloatTensorPrimitive,
Expand description
Execute a unary operation during the backward step.