tch
pub fn no_grad<T, F>(f: F) -> T where F: FnOnce() -> T,
Runs a closure without keeping track of gradients.