Function autograd::run
[−]
[src]
pub fn run<'a, 'b: 'a, 'c: 'a, T, U>(tensors: &[T], feeds: U) where
T: AsRef<Tensor>,
U: IntoIterator<Item = &'a (&'b Tensor, &'c NdArray)>,
Runs given symbolic tensors.
Runs, but returns nothing.
Any errors in this running session cause panics automatically.
To avoid this, use ag::eval
or Tensor::eval
.
extern crate ndarray; extern crate autograd as ag; let a = ag::variable(ndarray::arr1(&[1., 1.])); let b = ag::ones(&[2]); let c = ag::sub_inplace(a, &b); // runs inplace op. ag::run(&[&c], &[]);