withRequiresGrad

fun <T : DType, V> Tensor<T, V>.withRequiresGrad(flag: Boolean = true): Tensor<T, V>(source)

Mark a tensor as requiring gradients.