[−][src]Struct tch::Scalar
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.
fn add(self, rhs: Scalar) -> Self::Output
[src]
impl<'_> Add<&'_ Scalar> for Tensor
[src]
type Output = Tensor
The resulting type after applying the +
operator.
fn add(self, rhs: &Scalar) -> Self::Output
[src]
impl<'a, '_> Add<&'_ Scalar> for &'a Tensor
[src]
type Output = Tensor
The resulting type after applying the +
operator.
fn add(self, rhs: &Scalar) -> Self::Output
[src]
impl<'_> Add<Scalar> for &'_ Tensor
[src]
type Output = Tensor
The resulting type after applying the +
operator.
fn add(self, rhs: Scalar) -> Self::Output
[src]
impl Sub<Scalar> for Tensor
[src]
type Output = Tensor
The resulting type after applying the -
operator.
fn sub(self, rhs: Scalar) -> Self::Output
[src]
impl<'_> Sub<&'_ Scalar> for Tensor
[src]
type Output = Tensor
The resulting type after applying the -
operator.
fn sub(self, rhs: &Scalar) -> Self::Output
[src]
impl<'a, '_> Sub<&'_ Scalar> for &'a Tensor
[src]
type Output = Tensor
The resulting type after applying the -
operator.
fn sub(self, rhs: &Scalar) -> Self::Output
[src]
impl<'_> Sub<Scalar> for &'_ Tensor
[src]
type Output = Tensor
The resulting type after applying the -
operator.
fn sub(self, rhs: Scalar) -> Self::Output
[src]
impl Mul<Scalar> for Tensor
[src]
type Output = Tensor
The resulting type after applying the *
operator.
fn mul(self, rhs: Scalar) -> Self::Output
[src]
impl<'_> Mul<&'_ Scalar> for Tensor
[src]
type Output = Tensor
The resulting type after applying the *
operator.
fn mul(self, rhs: &Scalar) -> Self::Output
[src]
impl<'a, '_> Mul<&'_ Scalar> for &'a Tensor
[src]
type Output = Tensor
The resulting type after applying the *
operator.
fn mul(self, rhs: &Scalar) -> Self::Output
[src]
impl<'_> Mul<Scalar> for &'_ Tensor
[src]
type Output = Tensor
The resulting type after applying the *
operator.
fn mul(self, rhs: Scalar) -> Self::Output
[src]
impl Div<Scalar> for Tensor
[src]
type Output = Tensor
The resulting type after applying the /
operator.
fn div(self, rhs: Scalar) -> Self::Output
[src]
impl<'_> Div<&'_ Scalar> for Tensor
[src]
type Output = Tensor
The resulting type after applying the /
operator.
fn div(self, rhs: &Scalar) -> Self::Output
[src]
impl<'a, '_> Div<&'_ Scalar> for &'a Tensor
[src]
type Output = Tensor
The resulting type after applying the /
operator.
fn div(self, rhs: &Scalar) -> Self::Output
[src]
impl<'_> Div<Scalar> for &'_ Tensor
[src]
type Output = Tensor
The resulting type after applying the /
operator.
fn div(self, rhs: Scalar) -> Self::Output
[src]
impl AddAssign<Scalar> for Tensor
[src]
fn add_assign(&mut self, rhs: Scalar)
[src]
impl<'_> AddAssign<&'_ Scalar> for Tensor
[src]
fn add_assign(&mut self, rhs: &Scalar)
[src]
impl SubAssign<Scalar> for Tensor
[src]
fn sub_assign(&mut self, rhs: Scalar)
[src]
impl<'_> SubAssign<&'_ Scalar> for Tensor
[src]
fn sub_assign(&mut self, rhs: &Scalar)
[src]
impl MulAssign<Scalar> for Tensor
[src]
fn mul_assign(&mut self, rhs: Scalar)
[src]
impl<'_> MulAssign<&'_ Scalar> for Tensor
[src]
fn mul_assign(&mut self, rhs: &Scalar)
[src]
impl DivAssign<Scalar> for Tensor
[src]
fn div_assign(&mut self, rhs: Scalar)
[src]
impl<'_> DivAssign<&'_ Scalar> for Tensor
[src]
fn div_assign(&mut self, rhs: &Scalar)
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,