Struct autograd::tensor::TensorBuilder [−][src]
pub struct TensorBuilder { /* fields omitted */ }
Methods
impl TensorBuilder
[src]
impl TensorBuilder
pub fn set_shape(self, s: Tensor) -> TensorBuilder
[src]
pub fn set_shape(self, s: Tensor) -> TensorBuilder
pub fn set_has_gradient(self, a: bool) -> TensorBuilder
[src]
pub fn set_has_gradient(self, a: bool) -> TensorBuilder
pub fn set_inputs(self, a: Vec<&Tensor>) -> TensorBuilder
[src]
pub fn set_inputs(self, a: Vec<&Tensor>) -> TensorBuilder
pub fn set_inputs_slice(self, a: &[&Tensor]) -> TensorBuilder
[src]
pub fn set_inputs_slice(self, a: &[&Tensor]) -> TensorBuilder
pub fn set_input(self, a: &Tensor) -> TensorBuilder
[src]
pub fn set_input(self, a: &Tensor) -> TensorBuilder
pub fn set_is_placeholder(self, a: bool) -> TensorBuilder
[src]
pub fn set_is_placeholder(self, a: bool) -> TensorBuilder
pub fn set_constant_array(self, a: NdArray) -> TensorBuilder
[src]
pub fn set_constant_array(self, a: NdArray) -> TensorBuilder
pub fn set_variable_array(self, a: NdArray) -> TensorBuilder
[src]
pub fn set_variable_array(self, a: NdArray) -> TensorBuilder
pub fn set_input_indices(self, a: Vec<usize>) -> TensorBuilder
[src]
pub fn set_input_indices(self, a: Vec<usize>) -> TensorBuilder
pub fn set_backprop_inputs(self, a: Vec<Tensor>) -> TensorBuilder
[src]
pub fn set_backprop_inputs(self, a: Vec<Tensor>) -> TensorBuilder
pub fn build<T: Op + 'static>(self, op: T) -> Tensor
[src]
pub fn build<T: Op + 'static>(self, op: T) -> Tensor
extern crate ndarray; extern crate autograd as ag; let ref a = ag::zeros(&[4, 2]); let ref v = ag::zeros(&[2, 3]); let ref b = ag::zeros(&[4, 3]); let ref z = ag::matmul(a, v) + b; let mut vars = [a, v, b, z]; // `sort_by_key` don't reverse the order of `a` and `v` vars.sort_by_key(|a| a.top_rank); assert!(vars == [a, v, b, z])
Auto Trait Implementations
impl !Send for TensorBuilder
impl !Send for TensorBuilder
impl !Sync for TensorBuilder
impl !Sync for TensorBuilder