[][src]Struct tch::Scalar

pub struct Scalar { /* fields omitted */ }

Scalar elements.

Methods

impl Scalar[src]

pub fn int(v: i64) -> Scalar[src]

Creates an integer scalar.

pub fn float(v: f64) -> Scalar[src]

Creates a float scalar scalar.

Trait Implementations

impl Drop for Scalar[src]

impl From<i64> for Scalar[src]

impl From<f64> for Scalar[src]

impl Add<Scalar> for Tensor[src]

type Output = Tensor

The resulting type after applying the + operator.

impl<'_> Add<&'_ Scalar> for Tensor[src]

type Output = Tensor

The resulting type after applying the + operator.

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

type Output = Tensor

The resulting type after applying the + operator.

impl<'_> Add<Scalar> for &'_ Tensor[src]

type Output = Tensor

The resulting type after applying the + operator.

impl Sub<Scalar> for Tensor[src]

type Output = Tensor

The resulting type after applying the - operator.

impl<'_> Sub<&'_ Scalar> for Tensor[src]

type Output = Tensor

The resulting type after applying the - operator.

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

type Output = Tensor

The resulting type after applying the - operator.

impl<'_> Sub<Scalar> for &'_ Tensor[src]

type Output = Tensor

The resulting type after applying the - operator.

impl Mul<Scalar> for Tensor[src]

type Output = Tensor

The resulting type after applying the * operator.

impl<'_> Mul<&'_ Scalar> for Tensor[src]

type Output = Tensor

The resulting type after applying the * operator.

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

type Output = Tensor

The resulting type after applying the * operator.

impl<'_> Mul<Scalar> for &'_ Tensor[src]

type Output = Tensor

The resulting type after applying the * operator.

impl Div<Scalar> for Tensor[src]

type Output = Tensor

The resulting type after applying the / operator.

impl<'_> Div<&'_ Scalar> for Tensor[src]

type Output = Tensor

The resulting type after applying the / operator.

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

type Output = Tensor

The resulting type after applying the / operator.

impl<'_> Div<Scalar> for &'_ Tensor[src]

type Output = Tensor

The resulting type after applying the / operator.

impl AddAssign<Scalar> for Tensor[src]

impl<'_> AddAssign<&'_ Scalar> for Tensor[src]

impl SubAssign<Scalar> for Tensor[src]

impl<'_> SubAssign<&'_ Scalar> for Tensor[src]

impl MulAssign<Scalar> for Tensor[src]

impl<'_> MulAssign<&'_ Scalar> for Tensor[src]

impl DivAssign<Scalar> for Tensor[src]

impl<'_> DivAssign<&'_ Scalar> for Tensor[src]

Auto Trait Implementations

impl !Send for Scalar

impl !Sync for Scalar

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]