Struct autograd::Feed[][src]

pub struct Feed<'feed, T: Float> { /* fields omitted */ }
Expand description

Links a placeholder tensor and its value at run-time.

Use Tensor::given to instanciate, and ensure that this is passed to ag::Eval, ag::eval or Tensor::eval.

use ndarray::array;
use autograd as ag;

ag::with(|g| {
    let x = g.placeholder(&[2]);

    // Fills the placeholder with an ArrayView, then eval.
    let value = array![1., 1.];
    let feed: ag::Feed<_> = x.given(value.view());
    x.eval(&[feed]);
});

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.