Function dfdx::tensor_ops::sub_scalar
source · [−]Expand description
t - val
. val
is used for all elements of t
.
Example:
let t = Tensor1D::new([1.0, 2.0, -3.0]);
let r = t - 0.5;
assert_eq!(r.data(), &[0.5, 1.5, -3.5]);