Struct primitiv::Tensor [] [src]

pub struct Tensor { /* fields omitted */ }

Value with any dimensions.

Methods

impl Tensor
[src]

[src]

Creates an invalid Tensor object.

[src]

Check whether the object is valid or not.

[src]

Returns shape of the Tensor.

[src]

Returns the Device object related to the internal memory.

[src]

Retrieves one internal value in the tensor.

Remark: This function can be used only when the tensor is a scalar and non-minibatched (i.e., shape() == Shape()).

[src]

Retrieves internal values in the tensor as a vector. Remark: Each resulting values a re ordered by the column-major order, and the batch size is assumed as the last dimension of the tensor.

[src]

Retrieves argmax indices along an axis.

[src]

Retrieves argmin indices along an axis.

[src]

Reset internal values using a constant.

[src]

Reset internal values using a slice.

[src]

Returns a tensor which have the same values and different shape.

[src]

Returns a flattened tensor.

[src]

Directly multiplies a constant.

[src]

Directly adds a value.

[src]

Directly subtracts a value.

Trait Implementations

impl Debug for Tensor
[src]

[src]

Formats the value using the given formatter. Read more

impl Wrap<primitivTensor_t> for Tensor
[src]

impl Drop for Tensor
[src]

[src]

Executes the destructor for this type. Read more

impl Clone for Tensor
[src]

[src]

Returns a copy of the value. Read more

[src]

Performs copy-assignment from source. Read more

impl AsRef<Tensor> for Tensor
[src]

[src]

Performs the conversion.

impl Neg for Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the unary - operation.

impl Add<i8> for Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<i8> for &'a Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add<Tensor> for i8
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<&'a Tensor> for i8
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add<u8> for Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<u8> for &'a Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add<Tensor> for u8
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<&'a Tensor> for u8
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add<i16> for Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<i16> for &'a Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add<Tensor> for i16
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<&'a Tensor> for i16
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add<u16> for Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<u16> for &'a Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add<Tensor> for u16
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<&'a Tensor> for u16
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add<i32> for Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<i32> for &'a Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add<Tensor> for i32
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<&'a Tensor> for i32
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add<u32> for Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<u32> for &'a Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add<Tensor> for u32
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<&'a Tensor> for u32
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add<i64> for Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<i64> for &'a Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add<Tensor> for i64
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<&'a Tensor> for i64
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add<u64> for Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<u64> for &'a Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add<Tensor> for u64
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<&'a Tensor> for u64
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add<f32> for Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<f32> for &'a Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add<Tensor> for f32
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<&'a Tensor> for f32
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add<f64> for Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<f64> for &'a Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add<Tensor> for f64
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<&'a Tensor> for f64
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add for Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<Tensor> for &'a Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Add<&'a Tensor> for Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a, 'b> Add<&'a Tensor> for &'b Tensor
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Sub<i8> for Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<i8> for &'a Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Sub<Tensor> for i8
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<&'a Tensor> for i8
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Sub<u8> for Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<u8> for &'a Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Sub<Tensor> for u8
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<&'a Tensor> for u8
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Sub<i16> for Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<i16> for &'a Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Sub<Tensor> for i16
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<&'a Tensor> for i16
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Sub<u16> for Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<u16> for &'a Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Sub<Tensor> for u16
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<&'a Tensor> for u16
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Sub<i32> for Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<i32> for &'a Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Sub<Tensor> for i32
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<&'a Tensor> for i32
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Sub<u32> for Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<u32> for &'a Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Sub<Tensor> for u32
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<&'a Tensor> for u32
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Sub<i64> for Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<i64> for &'a Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Sub<Tensor> for i64
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<&'a Tensor> for i64
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Sub<u64> for Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<u64> for &'a Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Sub<Tensor> for u64
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<&'a Tensor> for u64
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Sub<f32> for Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<f32> for &'a Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Sub<Tensor> for f32
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<&'a Tensor> for f32
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Sub<f64> for Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<f64> for &'a Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Sub<Tensor> for f64
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<&'a Tensor> for f64
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Sub for Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<Tensor> for &'a Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> Sub<&'a Tensor> for Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a, 'b> Sub<&'a Tensor> for &'b Tensor
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Mul<i8> for Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<i8> for &'a Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<Tensor> for i8
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<&'a Tensor> for i8
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<u8> for Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<u8> for &'a Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<Tensor> for u8
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<&'a Tensor> for u8
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<i16> for Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<i16> for &'a Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<Tensor> for i16
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<&'a Tensor> for i16
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<u16> for Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<u16> for &'a Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<Tensor> for u16
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<&'a Tensor> for u16
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<i32> for Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<i32> for &'a Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<Tensor> for i32
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<&'a Tensor> for i32
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<u32> for Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<u32> for &'a Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<Tensor> for u32
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<&'a Tensor> for u32
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<i64> for Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<i64> for &'a Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<Tensor> for i64
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<&'a Tensor> for i64
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<u64> for Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<u64> for &'a Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<Tensor> for u64
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<&'a Tensor> for u64
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<f32> for Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<f32> for &'a Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<Tensor> for f32
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<&'a Tensor> for f32
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<f64> for Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<f64> for &'a Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<Tensor> for f64
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<&'a Tensor> for f64
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul for Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<Tensor> for &'a Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<&'a Tensor> for Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a, 'b> Mul<&'a Tensor> for &'b Tensor
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Div<i8> for Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<i8> for &'a Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div<Tensor> for i8
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<&'a Tensor> for i8
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div<u8> for Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<u8> for &'a Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div<Tensor> for u8
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<&'a Tensor> for u8
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div<i16> for Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<i16> for &'a Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div<Tensor> for i16
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<&'a Tensor> for i16
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div<u16> for Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<u16> for &'a Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div<Tensor> for u16
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<&'a Tensor> for u16
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div<i32> for Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<i32> for &'a Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div<Tensor> for i32
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<&'a Tensor> for i32
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div<u32> for Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<u32> for &'a Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div<Tensor> for u32
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<&'a Tensor> for u32
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div<i64> for Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<i64> for &'a Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div<Tensor> for i64
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<&'a Tensor> for i64
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div<u64> for Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<u64> for &'a Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div<Tensor> for u64
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<&'a Tensor> for u64
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div<f32> for Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<f32> for &'a Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div<Tensor> for f32
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<&'a Tensor> for f32
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div<f64> for Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<f64> for &'a Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div<Tensor> for f64
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<&'a Tensor> for f64
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div for Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<Tensor> for &'a Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a> Div<&'a Tensor> for Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a, 'b> Div<&'a Tensor> for &'b Tensor
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

Auto Trait Implementations

impl !Send for Tensor

impl !Sync for Tensor