Function tch::no_grad

source ·
pub fn no_grad<T, F>(f: F) -> Twhere
    F: FnOnce() -> T,
Expand description

Runs a closure without keeping track of gradients.