pub struct MpsGraph;Expand description
Apple MPSGraph backend for Burn.
Trait Implementations§
Source§impl ActivationOps<MpsGraph> for MpsGraph
impl ActivationOps<MpsGraph> for MpsGraph
Source§fn leaky_relu(
tensor: <B as Backend>::FloatTensorPrimitive,
negative_slope: Scalar,
) -> <B as Backend>::FloatTensorPrimitive
fn leaky_relu( tensor: <B as Backend>::FloatTensorPrimitive, negative_slope: Scalar, ) -> <B as Backend>::FloatTensorPrimitive
Applies the LeakyReLU activation function. Read more
Source§fn relu(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn relu( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Applies the ReLU activation function. Read more
Source§fn relu_backward(
output: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn relu_backward( output: <B as Backend>::FloatTensorPrimitive, grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Applies the ReLU activation function backward. Read more
Source§fn gelu(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn gelu( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Applies the Gelu activation function. Read more
Source§fn prelu(
tensor: <B as Backend>::FloatTensorPrimitive,
alpha: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn prelu( tensor: <B as Backend>::FloatTensorPrimitive, alpha: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Applies the PReLu activation function. Read more
Source§fn gelu_backward(
x: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn gelu_backward( x: <B as Backend>::FloatTensorPrimitive, grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Applies the Gelu activation function backward. Read more
Source§fn sigmoid(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn sigmoid( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Applies the Sigmoid activation function. Read more
Source§fn sigmoid_backward(
output: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn sigmoid_backward( output: <B as Backend>::FloatTensorPrimitive, grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Applies the Sigmoid activation function backward. Read more
Source§fn hard_sigmoid(
tensor: <B as Backend>::FloatTensorPrimitive,
alpha: Scalar,
beta: Scalar,
) -> <B as Backend>::FloatTensorPrimitive
fn hard_sigmoid( tensor: <B as Backend>::FloatTensorPrimitive, alpha: Scalar, beta: Scalar, ) -> <B as Backend>::FloatTensorPrimitive
Applies the hard Sigmoid activation function. Read more
Source§fn log_sigmoid(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn log_sigmoid( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Applies the LogSigmoid activation function. Read more
Source§fn log_sigmoid_backward(
x: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn log_sigmoid_backward( x: <B as Backend>::FloatTensorPrimitive, grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Applies the LogSigmoid activation function backward. Read more
Source§impl Backend for MpsGraph
impl Backend for MpsGraph
Source§type Device = MpsGraphDevice
type Device = MpsGraphDevice
Device type.
Source§type FloatTensorPrimitive = MpsGraphTensor
type FloatTensorPrimitive = MpsGraphTensor
Tensor primitive to be used for all float operations.
Source§type IntTensorPrimitive = MpsGraphTensor
type IntTensorPrimitive = MpsGraphTensor
Tensor primitive to be used for all int operations.
Source§type BoolTensorPrimitive = MpsGraphTensor
type BoolTensorPrimitive = MpsGraphTensor
Tensor primitive to be used for all bool operations.
Source§type QuantizedTensorPrimitive = MpsGraphQTensor
type QuantizedTensorPrimitive = MpsGraphQTensor
Tensor primitive to be used for all quantized operations.
Source§fn seed(_device: &Self::Device, seed: u64)
fn seed(_device: &Self::Device, seed: u64)
Seeds the backend on the specified device. Read more
Source§fn dtype_usage(_device: &Self::Device, dtype: DType) -> DTypeUsageSet
fn dtype_usage(_device: &Self::Device, dtype: DType) -> DTypeUsageSet
Returns the DTypeUsageSet for the given DType on the specified device.
Source§fn ad_enabled(_device: &Self::Device) -> bool
fn ad_enabled(_device: &Self::Device) -> bool
If autodiff is enabled.
Source§fn memory_persistent_allocations<Output, Input, Func>(
device: &Self::Device,
input: Input,
func: Func,
) -> Outputwhere
Func: Fn(Input) -> Output,
fn memory_persistent_allocations<Output, Input, Func>(
device: &Self::Device,
input: Input,
func: Func,
) -> Outputwhere
Func: Fn(Input) -> Output,
Sets the current allocation mode to persistent.
Source§fn memory_cleanup(device: &Self::Device)
fn memory_cleanup(device: &Self::Device)
Manually triggers a memory cleanup on the given device.
Source§fn sync(_device: &Self::Device) -> Result<(), ExecutionError>
fn sync(_device: &Self::Device) -> Result<(), ExecutionError>
Sync the backend, ensure that all computation are finished.
Source§impl BoolTensorOps<MpsGraph> for MpsGraph
impl BoolTensorOps<MpsGraph> for MpsGraph
Source§fn bool_empty(shape: Shape, device: &Device<MpsGraph>) -> BoolTensor<MpsGraph>
fn bool_empty(shape: Shape, device: &Device<MpsGraph>) -> BoolTensor<MpsGraph>
Creates a new bool tensor. Read more
Source§fn bool_zeros(shape: Shape, device: &Device<MpsGraph>) -> BoolTensor<MpsGraph>
fn bool_zeros(shape: Shape, device: &Device<MpsGraph>) -> BoolTensor<MpsGraph>
Creates a new bool tensor filled false. Read more
Source§fn bool_ones(shape: Shape, device: &Device<MpsGraph>) -> BoolTensor<MpsGraph>
fn bool_ones(shape: Shape, device: &Device<MpsGraph>) -> BoolTensor<MpsGraph>
Creates a new bool tensor filled true. Read more
Source§fn bool_into_data(
t: BoolTensor<MpsGraph>,
) -> impl Future<Output = Result<TensorData, ExecutionError>> + Send
fn bool_into_data( t: BoolTensor<MpsGraph>, ) -> impl Future<Output = Result<TensorData, ExecutionError>> + Send
Converts the tensor to a data structure. Read more
Source§fn bool_from_data(
data: TensorData,
device: &Device<MpsGraph>,
) -> BoolTensor<MpsGraph>
fn bool_from_data( data: TensorData, device: &Device<MpsGraph>, ) -> BoolTensor<MpsGraph>
Creates a tensor from the data structure. Read more
Source§fn bool_into_int(t: BoolTensor<MpsGraph>) -> IntTensor<MpsGraph>
fn bool_into_int(t: BoolTensor<MpsGraph>) -> IntTensor<MpsGraph>
Converts bool tensor to int tensor. Read more
Source§fn bool_into_float(t: BoolTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn bool_into_float(t: BoolTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Converts bool tensor to float tensor. Read more
Source§fn bool_device(t: &BoolTensor<MpsGraph>) -> Device<MpsGraph>
fn bool_device(t: &BoolTensor<MpsGraph>) -> Device<MpsGraph>
Gets the device of the tensor. Read more
Source§fn bool_to_device(
t: BoolTensor<MpsGraph>,
d: &Device<MpsGraph>,
) -> BoolTensor<MpsGraph>
fn bool_to_device( t: BoolTensor<MpsGraph>, d: &Device<MpsGraph>, ) -> BoolTensor<MpsGraph>
Moves the tensor to the device.
Source§fn bool_reshape(t: BoolTensor<MpsGraph>, shape: Shape) -> BoolTensor<MpsGraph>
fn bool_reshape(t: BoolTensor<MpsGraph>, shape: Shape) -> BoolTensor<MpsGraph>
Reshapes the tensor. Read more
Source§fn bool_slice(t: BoolTensor<MpsGraph>, slices: &[Slice]) -> BoolTensor<MpsGraph>
fn bool_slice(t: BoolTensor<MpsGraph>, slices: &[Slice]) -> BoolTensor<MpsGraph>
Gets the values from the tensor for the given ranges. Read more
Source§fn bool_slice_assign(
t: BoolTensor<MpsGraph>,
slices: &[Slice],
v: BoolTensor<MpsGraph>,
) -> BoolTensor<MpsGraph>
fn bool_slice_assign( t: BoolTensor<MpsGraph>, slices: &[Slice], v: BoolTensor<MpsGraph>, ) -> BoolTensor<MpsGraph>
Sets the values in the tensor for the given ranges. Read more
Source§fn bool_mask_where(
t: BoolTensor<MpsGraph>,
m: BoolTensor<MpsGraph>,
v: BoolTensor<MpsGraph>,
) -> BoolTensor<MpsGraph>
fn bool_mask_where( t: BoolTensor<MpsGraph>, m: BoolTensor<MpsGraph>, v: BoolTensor<MpsGraph>, ) -> BoolTensor<MpsGraph>
Fills the tensor with values from the value tensor if the mask is true at the given
indices. Read more
Source§fn bool_mask_fill(
t: BoolTensor<MpsGraph>,
m: BoolTensor<MpsGraph>,
v: Scalar,
) -> BoolTensor<MpsGraph>
fn bool_mask_fill( t: BoolTensor<MpsGraph>, m: BoolTensor<MpsGraph>, v: Scalar, ) -> BoolTensor<MpsGraph>
Fills the tensor with the given value if the mask is true at the given indices. Read more
Source§fn bool_gather(
dim: usize,
t: BoolTensor<MpsGraph>,
idx: IntTensor<MpsGraph>,
) -> BoolTensor<MpsGraph>
fn bool_gather( dim: usize, t: BoolTensor<MpsGraph>, idx: IntTensor<MpsGraph>, ) -> BoolTensor<MpsGraph>
Gather elements from the tensor at the given indices. Read more
Source§fn bool_scatter_or(
dim: usize,
t: BoolTensor<MpsGraph>,
idx: IntTensor<MpsGraph>,
v: BoolTensor<MpsGraph>,
) -> BoolTensor<MpsGraph>
fn bool_scatter_or( dim: usize, t: BoolTensor<MpsGraph>, idx: IntTensor<MpsGraph>, v: BoolTensor<MpsGraph>, ) -> BoolTensor<MpsGraph>
Scatter a given value to the tensor at the given indices using boolean or reduction. Read more
Source§fn bool_equal(
a: BoolTensor<MpsGraph>,
b: BoolTensor<MpsGraph>,
) -> BoolTensor<MpsGraph>
fn bool_equal( a: BoolTensor<MpsGraph>, b: BoolTensor<MpsGraph>, ) -> BoolTensor<MpsGraph>
Equates the two tensors. Read more
Source§fn bool_equal_elem(t: BoolTensor<MpsGraph>, v: Scalar) -> BoolTensor<MpsGraph>
fn bool_equal_elem(t: BoolTensor<MpsGraph>, v: Scalar) -> BoolTensor<MpsGraph>
Element-wise equality comparison with a scalar. Read more
Source§fn bool_not(t: BoolTensor<MpsGraph>) -> BoolTensor<MpsGraph>
fn bool_not(t: BoolTensor<MpsGraph>) -> BoolTensor<MpsGraph>
Inverses boolean values. Read more
Source§fn bool_and(
a: BoolTensor<MpsGraph>,
b: BoolTensor<MpsGraph>,
) -> BoolTensor<MpsGraph>
fn bool_and( a: BoolTensor<MpsGraph>, b: BoolTensor<MpsGraph>, ) -> BoolTensor<MpsGraph>
Executes the logical and (
&&) operation on two boolean tensors. Read moreSource§fn bool_or(
a: BoolTensor<MpsGraph>,
b: BoolTensor<MpsGraph>,
) -> BoolTensor<MpsGraph>
fn bool_or( a: BoolTensor<MpsGraph>, b: BoolTensor<MpsGraph>, ) -> BoolTensor<MpsGraph>
Executes the logical or (
||) operation on two boolean tensors. Read moreSource§fn bool_swap_dims(
t: BoolTensor<MpsGraph>,
d1: usize,
d2: usize,
) -> BoolTensor<MpsGraph>
fn bool_swap_dims( t: BoolTensor<MpsGraph>, d1: usize, d2: usize, ) -> BoolTensor<MpsGraph>
Swaps two dimensions of a bool tensor. Read more
Source§fn bool_permute(t: BoolTensor<MpsGraph>, axes: &[usize]) -> BoolTensor<MpsGraph>
fn bool_permute(t: BoolTensor<MpsGraph>, axes: &[usize]) -> BoolTensor<MpsGraph>
Permutes the dimensions of a tensor. Read more
Source§fn bool_flip(t: BoolTensor<MpsGraph>, axes: &[usize]) -> BoolTensor<MpsGraph>
fn bool_flip(t: BoolTensor<MpsGraph>, axes: &[usize]) -> BoolTensor<MpsGraph>
Reverse the order of elements in a tensor along the given axes. Read more
Source§fn bool_expand(t: BoolTensor<MpsGraph>, shape: Shape) -> BoolTensor<MpsGraph>
fn bool_expand(t: BoolTensor<MpsGraph>, shape: Shape) -> BoolTensor<MpsGraph>
Broadcasts the bool
tensor to the given shape.Source§fn bool_cat(
tensors: Vec<BoolTensor<MpsGraph>>,
dim: usize,
) -> BoolTensor<MpsGraph>
fn bool_cat( tensors: Vec<BoolTensor<MpsGraph>>, dim: usize, ) -> BoolTensor<MpsGraph>
Concatenates the tensors along the given dimension. Read more
Source§fn bool_unfold(
t: BoolTensor<MpsGraph>,
dim: usize,
size: usize,
step: usize,
) -> BoolTensor<MpsGraph>
fn bool_unfold( t: BoolTensor<MpsGraph>, dim: usize, size: usize, step: usize, ) -> BoolTensor<MpsGraph>
Unfold windows along a dimension. Read more
Source§fn bool_select(
tensor: <B as Backend>::BoolTensorPrimitive,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_select( tensor: <B as Backend>::BoolTensorPrimitive, dim: usize, indices: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Select tensor elements along the given dimension corresponding to the given indices. Read more
Source§fn bool_select_or(
tensor: <B as Backend>::BoolTensorPrimitive,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive,
value: <B as Backend>::BoolTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_select_or( tensor: <B as Backend>::BoolTensorPrimitive, dim: usize, indices: <B as Backend>::IntTensorPrimitive, value: <B as Backend>::BoolTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Assign the selected elements along the given dimension corresponding to the given indices
to the given value using sum reduction. Read more
Source§fn bool_repeat_dim(
tensor: <B as Backend>::BoolTensorPrimitive,
dim: usize,
times: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_repeat_dim( tensor: <B as Backend>::BoolTensorPrimitive, dim: usize, times: usize, ) -> <B as Backend>::BoolTensorPrimitive
Repeats one dimension of the tensor a given number of times along that dimension. Read more
Source§fn bool_not_equal(
lhs: <B as Backend>::BoolTensorPrimitive,
rhs: <B as Backend>::BoolTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_not_equal( lhs: <B as Backend>::BoolTensorPrimitive, rhs: <B as Backend>::BoolTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise non-equality comparison. Read more
Source§fn bool_not_equal_elem(
lhs: <B as Backend>::BoolTensorPrimitive,
rhs: Scalar,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_not_equal_elem( lhs: <B as Backend>::BoolTensorPrimitive, rhs: Scalar, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise non-equality comparison with a scalar. Read more
Source§fn bool_xor(
lhs: <B as Backend>::BoolTensorPrimitive,
rhs: <B as Backend>::BoolTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_xor( lhs: <B as Backend>::BoolTensorPrimitive, rhs: <B as Backend>::BoolTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise exclusive or. Read more
Source§fn bool_transpose(
tensor: <B as Backend>::BoolTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_transpose( tensor: <B as Backend>::BoolTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Transposes a bool tensor. Read more
Source§fn bool_any(
tensor: <B as Backend>::BoolTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_any( tensor: <B as Backend>::BoolTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Tests if any element in the boolean
tensor evaluates to True. Read moreSource§fn bool_any_dim(
tensor: <B as Backend>::BoolTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_any_dim( tensor: <B as Backend>::BoolTensorPrimitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
Source§fn bool_all(
tensor: <B as Backend>::BoolTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_all( tensor: <B as Backend>::BoolTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Tests if all elements in the boolean
tensor evaluate to True. Read moreSource§fn bool_all_dim(
tensor: <B as Backend>::BoolTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_all_dim( tensor: <B as Backend>::BoolTensorPrimitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
Source§fn bool_argwhere(
tensor: <B as Backend>::BoolTensorPrimitive,
) -> impl Future<Output = <B as Backend>::IntTensorPrimitive> + Send + 'static
fn bool_argwhere( tensor: <B as Backend>::BoolTensorPrimitive, ) -> impl Future<Output = <B as Backend>::IntTensorPrimitive> + Send + 'static
Compute the indices of the elements that are non-zero, grouped by element. Read more
Source§impl FloatTensorOps<MpsGraph> for MpsGraph
impl FloatTensorOps<MpsGraph> for MpsGraph
Source§fn float_from_data(
data: TensorData,
device: &Device<MpsGraph>,
) -> FloatTensor<MpsGraph>
fn float_from_data( data: TensorData, device: &Device<MpsGraph>, ) -> FloatTensor<MpsGraph>
Creates a new tensor from the data structure. Read more
Source§fn float_random(
shape: Shape,
distribution: Distribution,
device: &Device<MpsGraph>,
) -> FloatTensor<MpsGraph>
fn float_random( shape: Shape, distribution: Distribution, device: &Device<MpsGraph>, ) -> FloatTensor<MpsGraph>
Creates a new tensor with random values. Read more
Source§fn float_into_data(
t: FloatTensor<MpsGraph>,
) -> impl Future<Output = Result<TensorData, ExecutionError>> + Send
fn float_into_data( t: FloatTensor<MpsGraph>, ) -> impl Future<Output = Result<TensorData, ExecutionError>> + Send
Converts the tensor to a data structure. Read more
Source§fn float_device(t: &FloatTensor<MpsGraph>) -> Device<MpsGraph>
fn float_device(t: &FloatTensor<MpsGraph>) -> Device<MpsGraph>
Gets the device of the tensor. Read more
Source§fn float_to_device(
t: FloatTensor<MpsGraph>,
device: &Device<MpsGraph>,
) -> FloatTensor<MpsGraph>
fn float_to_device( t: FloatTensor<MpsGraph>, device: &Device<MpsGraph>, ) -> FloatTensor<MpsGraph>
Moves the tensor to the given device. Read more
Source§fn float_into_int(t: FloatTensor<MpsGraph>) -> IntTensor<MpsGraph>
fn float_into_int(t: FloatTensor<MpsGraph>) -> IntTensor<MpsGraph>
Converts float tensor to int tensor. Read more
Source§fn float_empty(
shape: Shape,
device: &Device<MpsGraph>,
dtype: FloatDType,
) -> FloatTensor<MpsGraph>
fn float_empty( shape: Shape, device: &Device<MpsGraph>, dtype: FloatDType, ) -> FloatTensor<MpsGraph>
Creates an empty tensor with the given shape. Read more
Source§fn float_add(
lhs: FloatTensor<MpsGraph>,
rhs: FloatTensor<MpsGraph>,
) -> FloatTensor<MpsGraph>
fn float_add( lhs: FloatTensor<MpsGraph>, rhs: FloatTensor<MpsGraph>, ) -> FloatTensor<MpsGraph>
Adds two tensors together. Read more
Source§fn float_add_scalar(
lhs: FloatTensor<MpsGraph>,
rhs: Scalar,
) -> FloatTensor<MpsGraph>
fn float_add_scalar( lhs: FloatTensor<MpsGraph>, rhs: Scalar, ) -> FloatTensor<MpsGraph>
Adds a scalar to a tensor. Read more
Source§fn float_sub(
lhs: FloatTensor<MpsGraph>,
rhs: FloatTensor<MpsGraph>,
) -> FloatTensor<MpsGraph>
fn float_sub( lhs: FloatTensor<MpsGraph>, rhs: FloatTensor<MpsGraph>, ) -> FloatTensor<MpsGraph>
Subtracts two tensors. Read more
Source§fn float_sub_scalar(
lhs: FloatTensor<MpsGraph>,
rhs: Scalar,
) -> FloatTensor<MpsGraph>
fn float_sub_scalar( lhs: FloatTensor<MpsGraph>, rhs: Scalar, ) -> FloatTensor<MpsGraph>
Subtracts a scalar from a tensor. Read more
Source§fn float_mul(
lhs: FloatTensor<MpsGraph>,
rhs: FloatTensor<MpsGraph>,
) -> FloatTensor<MpsGraph>
fn float_mul( lhs: FloatTensor<MpsGraph>, rhs: FloatTensor<MpsGraph>, ) -> FloatTensor<MpsGraph>
Multiplies two tensors together element-wise.
Source§fn float_mul_scalar(
lhs: FloatTensor<MpsGraph>,
rhs: Scalar,
) -> FloatTensor<MpsGraph>
fn float_mul_scalar( lhs: FloatTensor<MpsGraph>, rhs: Scalar, ) -> FloatTensor<MpsGraph>
Multiplies a tensor by a scalar. Read more
Source§fn float_div(
lhs: FloatTensor<MpsGraph>,
rhs: FloatTensor<MpsGraph>,
) -> FloatTensor<MpsGraph>
fn float_div( lhs: FloatTensor<MpsGraph>, rhs: FloatTensor<MpsGraph>, ) -> FloatTensor<MpsGraph>
Divides two tensors element-wise. Read more
Source§fn float_div_scalar(
lhs: FloatTensor<MpsGraph>,
rhs: Scalar,
) -> FloatTensor<MpsGraph>
fn float_div_scalar( lhs: FloatTensor<MpsGraph>, rhs: Scalar, ) -> FloatTensor<MpsGraph>
Divides a tensor by a scalar. Read more
Source§fn float_remainder(
lhs: FloatTensor<MpsGraph>,
rhs: FloatTensor<MpsGraph>,
) -> FloatTensor<MpsGraph>
fn float_remainder( lhs: FloatTensor<MpsGraph>, rhs: FloatTensor<MpsGraph>, ) -> FloatTensor<MpsGraph>
Computes the remainder of division between two tensors element-wise. Read more
Source§fn float_remainder_scalar(
lhs: FloatTensor<MpsGraph>,
rhs: Scalar,
) -> FloatTensor<MpsGraph>
fn float_remainder_scalar( lhs: FloatTensor<MpsGraph>, rhs: Scalar, ) -> FloatTensor<MpsGraph>
Computes the modulus of a tensor given a scalar. Read more
Source§fn float_powf(
lhs: FloatTensor<MpsGraph>,
rhs: FloatTensor<MpsGraph>,
) -> FloatTensor<MpsGraph>
fn float_powf( lhs: FloatTensor<MpsGraph>, rhs: FloatTensor<MpsGraph>, ) -> FloatTensor<MpsGraph>
Element-wise power with a FloatTensor. Read more
Source§fn float_powf_scalar_impl(
t: FloatTensor<MpsGraph>,
v: Scalar,
) -> FloatTensor<MpsGraph>
fn float_powf_scalar_impl( t: FloatTensor<MpsGraph>, v: Scalar, ) -> FloatTensor<MpsGraph>
Returns a new tensor with values raised to the power of float
value. Read moreSource§fn float_matmul(
a: FloatTensor<MpsGraph>,
b: FloatTensor<MpsGraph>,
) -> FloatTensor<MpsGraph>
fn float_matmul( a: FloatTensor<MpsGraph>, b: FloatTensor<MpsGraph>, ) -> FloatTensor<MpsGraph>
Multiplies two tensors together using matrix multiplication. Read more
Source§fn float_recip(t: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_recip(t: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Calculates the reciprocals element-wise
Source§fn float_cross(
lhs: FloatTensor<MpsGraph>,
rhs: FloatTensor<MpsGraph>,
dim: usize,
) -> FloatTensor<MpsGraph>
fn float_cross( lhs: FloatTensor<MpsGraph>, rhs: FloatTensor<MpsGraph>, dim: usize, ) -> FloatTensor<MpsGraph>
Computes the cross product of two tensors along a given dimension. Read more
Source§fn float_equal(
lhs: FloatTensor<MpsGraph>,
rhs: FloatTensor<MpsGraph>,
) -> BoolTensor<MpsGraph>
fn float_equal( lhs: FloatTensor<MpsGraph>, rhs: FloatTensor<MpsGraph>, ) -> BoolTensor<MpsGraph>
Equal comparison of two tensors. Read more
Source§fn float_equal_elem(
lhs: FloatTensor<MpsGraph>,
rhs: Scalar,
) -> BoolTensor<MpsGraph>
fn float_equal_elem( lhs: FloatTensor<MpsGraph>, rhs: Scalar, ) -> BoolTensor<MpsGraph>
Equal comparison of a tensor and a scalar. Read more
Source§fn float_greater(
lhs: FloatTensor<MpsGraph>,
rhs: FloatTensor<MpsGraph>,
) -> BoolTensor<MpsGraph>
fn float_greater( lhs: FloatTensor<MpsGraph>, rhs: FloatTensor<MpsGraph>, ) -> BoolTensor<MpsGraph>
Greater than comparison of two tensors. Read more
Source§fn float_greater_elem(
lhs: FloatTensor<MpsGraph>,
rhs: Scalar,
) -> BoolTensor<MpsGraph>
fn float_greater_elem( lhs: FloatTensor<MpsGraph>, rhs: Scalar, ) -> BoolTensor<MpsGraph>
Greater than comparison of a tensor and a scalar. Read more
Source§fn float_greater_equal(
lhs: FloatTensor<MpsGraph>,
rhs: FloatTensor<MpsGraph>,
) -> BoolTensor<MpsGraph>
fn float_greater_equal( lhs: FloatTensor<MpsGraph>, rhs: FloatTensor<MpsGraph>, ) -> BoolTensor<MpsGraph>
Greater than or equal comparison of two tensors. Read more
Source§fn float_greater_equal_elem(
lhs: FloatTensor<MpsGraph>,
rhs: Scalar,
) -> BoolTensor<MpsGraph>
fn float_greater_equal_elem( lhs: FloatTensor<MpsGraph>, rhs: Scalar, ) -> BoolTensor<MpsGraph>
Greater than or equal comparison of a tensor and a scalar. Read more
Source§fn float_lower(
lhs: FloatTensor<MpsGraph>,
rhs: FloatTensor<MpsGraph>,
) -> BoolTensor<MpsGraph>
fn float_lower( lhs: FloatTensor<MpsGraph>, rhs: FloatTensor<MpsGraph>, ) -> BoolTensor<MpsGraph>
Less than comparison of two tensors. Read more
Source§fn float_lower_elem(
lhs: FloatTensor<MpsGraph>,
rhs: Scalar,
) -> BoolTensor<MpsGraph>
fn float_lower_elem( lhs: FloatTensor<MpsGraph>, rhs: Scalar, ) -> BoolTensor<MpsGraph>
Less than comparison of a tensor and a scalar. Read more
Source§fn float_lower_equal(
lhs: FloatTensor<MpsGraph>,
rhs: FloatTensor<MpsGraph>,
) -> BoolTensor<MpsGraph>
fn float_lower_equal( lhs: FloatTensor<MpsGraph>, rhs: FloatTensor<MpsGraph>, ) -> BoolTensor<MpsGraph>
Less than or equal comparison of two tensors. Read more
Source§fn float_lower_equal_elem(
lhs: FloatTensor<MpsGraph>,
rhs: Scalar,
) -> BoolTensor<MpsGraph>
fn float_lower_equal_elem( lhs: FloatTensor<MpsGraph>, rhs: Scalar, ) -> BoolTensor<MpsGraph>
Less than or equal comparison of a tensor and a scalar. Read more
Source§fn float_exp(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_exp(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with exponential values. Read more
Source§fn float_log(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_log(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with natural logarithm values. Read more
Source§fn float_sqrt(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_sqrt(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with square root values. Read more
Source§fn float_abs(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_abs(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with absolute values. Read more
Source§fn float_cos(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_cos(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with cosine values. Read more
Source§fn float_sin(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_sin(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with sine values. Read more
Source§fn float_tan(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_tan(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with tangent values. Read more
Source§fn float_cosh(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_cosh(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with hyperbolic cosine values. Read more
Source§fn float_sinh(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_sinh(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with hyperbolic sine values. Read more
Source§fn float_tanh(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_tanh(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with hyperbolic tangent values. Read more
Source§fn float_acos(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_acos(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with inverse cosine values. Read more
Source§fn float_acosh(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_acosh(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with inverse hyperbolic cosine values. Read more
Source§fn float_asin(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_asin(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with inverse sine values. Read more
Source§fn float_asinh(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_asinh(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with inverse hyperbolic sine values. Read more
Source§fn float_atan(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_atan(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with the inverse tangent values. Read more
Source§fn float_atanh(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_atanh(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with the inverse hyperbolic tangent values. Read more
Source§fn float_erf(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_erf(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with the error function values. Read more
Source§fn float_floor(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_floor(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with floored values. Read more
Source§fn float_ceil(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_ceil(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with ceiled values. Read more
Source§fn float_round(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_round(tensor: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with rounded values. Read more
Source§fn float_atan2(
lhs: FloatTensor<MpsGraph>,
rhs: FloatTensor<MpsGraph>,
) -> FloatTensor<MpsGraph>
fn float_atan2( lhs: FloatTensor<MpsGraph>, rhs: FloatTensor<MpsGraph>, ) -> FloatTensor<MpsGraph>
Source§fn float_log1p(t: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_log1p(t: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with logarithm values of (1 + Xi). Read more
Source§fn float_trunc(t: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_trunc(t: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Returns a new tensor with truncated values. Read more
Source§fn float_swap_dims(
t: FloatTensor<MpsGraph>,
d1: usize,
d2: usize,
) -> FloatTensor<MpsGraph>
fn float_swap_dims( t: FloatTensor<MpsGraph>, d1: usize, d2: usize, ) -> FloatTensor<MpsGraph>
Swaps two dimensions of a tensor. Read more
Source§fn float_permute(
t: FloatTensor<MpsGraph>,
axes: &[usize],
) -> FloatTensor<MpsGraph>
fn float_permute( t: FloatTensor<MpsGraph>, axes: &[usize], ) -> FloatTensor<MpsGraph>
Permutes the dimensions of a tensor. Read more
Source§fn float_flip(t: FloatTensor<MpsGraph>, axes: &[usize]) -> FloatTensor<MpsGraph>
fn float_flip(t: FloatTensor<MpsGraph>, axes: &[usize]) -> FloatTensor<MpsGraph>
Reverse the order of elements in a tensor along the given axes. Read more
Source§fn float_reshape(
t: FloatTensor<MpsGraph>,
shape: Shape,
) -> FloatTensor<MpsGraph>
fn float_reshape( t: FloatTensor<MpsGraph>, shape: Shape, ) -> FloatTensor<MpsGraph>
Reshapes a tensor. Read more
Source§fn float_expand(t: FloatTensor<MpsGraph>, shape: Shape) -> FloatTensor<MpsGraph>
fn float_expand(t: FloatTensor<MpsGraph>, shape: Shape) -> FloatTensor<MpsGraph>
Broadcasts the float
tensor to the given shape.Source§fn float_slice(
t: FloatTensor<MpsGraph>,
slices: &[Slice],
) -> FloatTensor<MpsGraph>
fn float_slice( t: FloatTensor<MpsGraph>, slices: &[Slice], ) -> FloatTensor<MpsGraph>
Select tensor elements corresponding to the given slices. Read more
Source§fn float_slice_assign(
t: FloatTensor<MpsGraph>,
slices: &[Slice],
value: FloatTensor<MpsGraph>,
) -> FloatTensor<MpsGraph>
fn float_slice_assign( t: FloatTensor<MpsGraph>, slices: &[Slice], value: FloatTensor<MpsGraph>, ) -> FloatTensor<MpsGraph>
Assign the selected elements corresponding to the given slices to the given value. Read more
Source§fn float_cat(
tensors: Vec<FloatTensor<MpsGraph>>,
dim: usize,
) -> FloatTensor<MpsGraph>
fn float_cat( tensors: Vec<FloatTensor<MpsGraph>>, dim: usize, ) -> FloatTensor<MpsGraph>
Concatenates tensors along a dimension. Read more
Source§fn float_gather(
dim: usize,
t: FloatTensor<MpsGraph>,
idx: IntTensor<MpsGraph>,
) -> FloatTensor<MpsGraph>
fn float_gather( dim: usize, t: FloatTensor<MpsGraph>, idx: IntTensor<MpsGraph>, ) -> FloatTensor<MpsGraph>
Gather elements from a tensor. Read more
Source§fn float_scatter_add(
dim: usize,
t: FloatTensor<MpsGraph>,
idx: IntTensor<MpsGraph>,
val: FloatTensor<MpsGraph>,
) -> FloatTensor<MpsGraph>
fn float_scatter_add( dim: usize, t: FloatTensor<MpsGraph>, idx: IntTensor<MpsGraph>, val: FloatTensor<MpsGraph>, ) -> FloatTensor<MpsGraph>
Scatter elements into a tensor using sum reduction. Read more
Source§fn float_select(
t: FloatTensor<MpsGraph>,
dim: usize,
idx: IntTensor<MpsGraph>,
) -> FloatTensor<MpsGraph>
fn float_select( t: FloatTensor<MpsGraph>, dim: usize, idx: IntTensor<MpsGraph>, ) -> FloatTensor<MpsGraph>
Select tensor elements along the given dimension corresponding for the given indices. Read more
Source§fn float_select_add(
t: FloatTensor<MpsGraph>,
dim: usize,
idx: IntTensor<MpsGraph>,
val: FloatTensor<MpsGraph>,
) -> FloatTensor<MpsGraph>
fn float_select_add( t: FloatTensor<MpsGraph>, dim: usize, idx: IntTensor<MpsGraph>, val: FloatTensor<MpsGraph>, ) -> FloatTensor<MpsGraph>
Assign the selected elements along the given dimension corresponding for the given indices
to the given value using sum reduction. Read more
Source§fn float_mask_where(
t: FloatTensor<MpsGraph>,
mask: BoolTensor<MpsGraph>,
val: FloatTensor<MpsGraph>,
) -> FloatTensor<MpsGraph>
fn float_mask_where( t: FloatTensor<MpsGraph>, mask: BoolTensor<MpsGraph>, val: FloatTensor<MpsGraph>, ) -> FloatTensor<MpsGraph>
Update the given tensor with the value tensor where the mask is true. Read more
Source§fn float_mask_fill(
t: FloatTensor<MpsGraph>,
mask: BoolTensor<MpsGraph>,
val: Scalar,
) -> FloatTensor<MpsGraph>
fn float_mask_fill( t: FloatTensor<MpsGraph>, mask: BoolTensor<MpsGraph>, val: Scalar, ) -> FloatTensor<MpsGraph>
Update the given tensor with the value where the mask is true. Read more
Source§fn float_sum(t: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_sum(t: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Sum of all elements in a tensor. Read more
Source§fn float_sum_dim(t: FloatTensor<MpsGraph>, dim: usize) -> FloatTensor<MpsGraph>
fn float_sum_dim(t: FloatTensor<MpsGraph>, dim: usize) -> FloatTensor<MpsGraph>
Sum of all elements in a tensor along a dimension. Read more
Source§fn float_mean_dim(t: FloatTensor<MpsGraph>, dim: usize) -> FloatTensor<MpsGraph>
fn float_mean_dim(t: FloatTensor<MpsGraph>, dim: usize) -> FloatTensor<MpsGraph>
Mean of all elements in a tensor along a dimension. Read more
Source§fn float_argmax(t: FloatTensor<MpsGraph>, dim: usize) -> IntTensor<MpsGraph>
fn float_argmax(t: FloatTensor<MpsGraph>, dim: usize) -> IntTensor<MpsGraph>
Gets the indices of the maximum elements of a tensor along an axis. Read more
Source§fn float_argmin(t: FloatTensor<MpsGraph>, dim: usize) -> IntTensor<MpsGraph>
fn float_argmin(t: FloatTensor<MpsGraph>, dim: usize) -> IntTensor<MpsGraph>
Gets the indices of the minimum elements of a tensor along an axis. Read more
Source§fn float_cumsum(t: FloatTensor<MpsGraph>, dim: usize) -> FloatTensor<MpsGraph>
fn float_cumsum(t: FloatTensor<MpsGraph>, dim: usize) -> FloatTensor<MpsGraph>
Computes the cumulative sum of elements along a dimension. Read more
Source§fn float_cumprod(t: FloatTensor<MpsGraph>, dim: usize) -> FloatTensor<MpsGraph>
fn float_cumprod(t: FloatTensor<MpsGraph>, dim: usize) -> FloatTensor<MpsGraph>
Computes the cumulative product of elements along a dimension. Read more
Source§fn float_cummin(t: FloatTensor<MpsGraph>, dim: usize) -> FloatTensor<MpsGraph>
fn float_cummin(t: FloatTensor<MpsGraph>, dim: usize) -> FloatTensor<MpsGraph>
Computes the cumulative minimum of elements along a dimension. Read more
Source§fn float_cummax(t: FloatTensor<MpsGraph>, dim: usize) -> FloatTensor<MpsGraph>
fn float_cummax(t: FloatTensor<MpsGraph>, dim: usize) -> FloatTensor<MpsGraph>
Computes the cumulative maximum of elements along a dimension. Read more
Source§fn float_sort(
t: FloatTensor<MpsGraph>,
dim: usize,
desc: bool,
) -> FloatTensor<MpsGraph>
fn float_sort( t: FloatTensor<MpsGraph>, dim: usize, desc: bool, ) -> FloatTensor<MpsGraph>
Sort the elements of the input
tensor by value in along a given dimension. Read moreSource§fn float_argsort(
t: FloatTensor<MpsGraph>,
dim: usize,
desc: bool,
) -> IntTensor<MpsGraph>
fn float_argsort( t: FloatTensor<MpsGraph>, dim: usize, desc: bool, ) -> IntTensor<MpsGraph>
Returns the indices that sort the elements of the input
tensor by value along a given dimension. Read moreSource§fn float_cast(
t: FloatTensor<MpsGraph>,
dtype: FloatDType,
) -> FloatTensor<MpsGraph>
fn float_cast( t: FloatTensor<MpsGraph>, dtype: FloatDType, ) -> FloatTensor<MpsGraph>
Converts a tensor to another floating point data type. Read more
Source§fn float_prod(t: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn float_prod(t: FloatTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Product of all elements in a tensor. Read more
Source§fn float_prod_dim(t: FloatTensor<MpsGraph>, dim: usize) -> FloatTensor<MpsGraph>
fn float_prod_dim(t: FloatTensor<MpsGraph>, dim: usize) -> FloatTensor<MpsGraph>
Product of all elements in a tensor along a dimension. Read more
Source§fn float_max_dim(t: FloatTensor<MpsGraph>, dim: usize) -> FloatTensor<MpsGraph>
fn float_max_dim(t: FloatTensor<MpsGraph>, dim: usize) -> FloatTensor<MpsGraph>
Gets the maximum elements of a tensor along an axis. Read more
Source§fn float_min_dim(t: FloatTensor<MpsGraph>, dim: usize) -> FloatTensor<MpsGraph>
fn float_min_dim(t: FloatTensor<MpsGraph>, dim: usize) -> FloatTensor<MpsGraph>
Gets the minimum elements of a tensor along an axis. Read more
Source§fn float_unfold(
t: FloatTensor<MpsGraph>,
dim: usize,
size: usize,
step: usize,
) -> FloatTensor<MpsGraph>
fn float_unfold( t: FloatTensor<MpsGraph>, dim: usize, size: usize, step: usize, ) -> FloatTensor<MpsGraph>
Unfold windows along a dimension. Read more
Source§fn float_zeros(
shape: Shape,
device: &<B as Backend>::Device,
dtype: FloatDType,
) -> <B as Backend>::FloatTensorPrimitive
fn float_zeros( shape: Shape, device: &<B as Backend>::Device, dtype: FloatDType, ) -> <B as Backend>::FloatTensorPrimitive
Creates a new tensor with zeros. Read more
Source§fn float_ones(
shape: Shape,
device: &<B as Backend>::Device,
dtype: FloatDType,
) -> <B as Backend>::FloatTensorPrimitive
fn float_ones( shape: Shape, device: &<B as Backend>::Device, dtype: FloatDType, ) -> <B as Backend>::FloatTensorPrimitive
Creates a new tensor with ones. Read more
Source§fn float_full(
shape: Shape,
fill_value: Scalar,
device: &<B as Backend>::Device,
dtype: FloatDType,
) -> <B as Backend>::FloatTensorPrimitive
fn float_full( shape: Shape, fill_value: Scalar, device: &<B as Backend>::Device, dtype: FloatDType, ) -> <B as Backend>::FloatTensorPrimitive
Creates a tensor filled with given value. Read more
Source§fn float_repeat_dim(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
times: usize,
) -> <B as Backend>::FloatTensorPrimitive
fn float_repeat_dim( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, times: usize, ) -> <B as Backend>::FloatTensorPrimitive
Repeat the tensor along the given dimension. Read more
Source§fn float_clamp_min(
tensor: <B as Backend>::FloatTensorPrimitive,
min: Scalar,
) -> <B as Backend>::FloatTensorPrimitive
fn float_clamp_min( tensor: <B as Backend>::FloatTensorPrimitive, min: Scalar, ) -> <B as Backend>::FloatTensorPrimitive
Clamps a tensor under a minimum value. Read more
Source§fn float_clamp_max(
tensor: <B as Backend>::FloatTensorPrimitive,
max: Scalar,
) -> <B as Backend>::FloatTensorPrimitive
fn float_clamp_max( tensor: <B as Backend>::FloatTensorPrimitive, max: Scalar, ) -> <B as Backend>::FloatTensorPrimitive
Clamps a tensor over a maximum value. Read more
Source§fn float_clamp(
tensor: <B as Backend>::FloatTensorPrimitive,
min: Scalar,
max: Scalar,
) -> <B as Backend>::FloatTensorPrimitive
fn float_clamp( tensor: <B as Backend>::FloatTensorPrimitive, min: Scalar, max: Scalar, ) -> <B as Backend>::FloatTensorPrimitive
Clamps a tensor between a minimum and maximum value. Read more
Source§fn float_neg(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_neg( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Negates a tensor element-wise.
Source§fn float_transpose(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_transpose( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Transposes a tensor. Read more
Source§fn float_not_equal(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn float_not_equal( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise non-equality comparison. Read more
Source§fn float_not_equal_elem(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: Scalar,
) -> <B as Backend>::BoolTensorPrimitive
fn float_not_equal_elem( lhs: <B as Backend>::FloatTensorPrimitive, rhs: Scalar, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise non-equality comparison with a scalar. Read more
Source§fn float_detach(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_detach( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Detaches a tensor from the computation graph.
Source§fn float_set_require_grad(
tensor: <B as Backend>::FloatTensorPrimitive,
_require_grad: bool,
) -> <B as Backend>::FloatTensorPrimitive
fn float_set_require_grad( tensor: <B as Backend>::FloatTensorPrimitive, _require_grad: bool, ) -> <B as Backend>::FloatTensorPrimitive
Sets the
require_grad flag of a tensor.Source§fn float_is_require_grad(_tensor: &<B as Backend>::FloatTensorPrimitive) -> bool
fn float_is_require_grad(_tensor: &<B as Backend>::FloatTensorPrimitive) -> bool
Returns the
require_grad flag of a tensor.Source§fn float_mean(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_mean( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Mean of all elements in a tensor. Read more
Source§fn float_powi(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_powi( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Element-wise power with an IntTensor. Read more
Source§fn float_powi_scalar(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: Scalar,
) -> <B as Backend>::FloatTensorPrimitive
fn float_powi_scalar( lhs: <B as Backend>::FloatTensorPrimitive, rhs: Scalar, ) -> <B as Backend>::FloatTensorPrimitive
Raises a tensor to the power of an int scalar. Read more
Source§fn float_powi_scalar_impl(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: Scalar,
) -> <B as Backend>::FloatTensorPrimitive
fn float_powi_scalar_impl( lhs: <B as Backend>::FloatTensorPrimitive, rhs: Scalar, ) -> <B as Backend>::FloatTensorPrimitive
Raises a tensor to the power of an int scalar. Read more
Source§fn float_powf_scalar(
tensor: <B as Backend>::FloatTensorPrimitive,
value: Scalar,
) -> <B as Backend>::FloatTensorPrimitive
fn float_powf_scalar( tensor: <B as Backend>::FloatTensorPrimitive, value: Scalar, ) -> <B as Backend>::FloatTensorPrimitive
Returns a new tensor with values raised to the power of float
value. Read moreSource§fn float_max(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_max( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Gets the maximum element of a tensor. Read more
Source§fn float_max_dim_with_indices(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> (<B as Backend>::FloatTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn float_max_dim_with_indices( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, ) -> (<B as Backend>::FloatTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Gets the maximum elements of a tensor along an axis and their indices. Read more
Source§fn float_min(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_min( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Gets the minimum element of a tensor. Read more
Source§fn float_min_dim_with_indices(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> (<B as Backend>::FloatTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn float_min_dim_with_indices( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, ) -> (<B as Backend>::FloatTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Gets the minimum elements of a tensor along an axis and their indices. Read more
Source§fn float_max_abs(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_max_abs( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Gets the maximum absolute element of a tensor. Read more
Source§fn float_max_abs_dim(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive
fn float_max_abs_dim( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, ) -> <B as Backend>::FloatTensorPrimitive
Gets the maximum absolute elements of a tensor along an axis. Read more
Source§fn float_any(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn float_any( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Tests if any element in the float
tensor evaluates to True. Read moreSource§fn float_any_dim(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn float_any_dim( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
Source§fn float_all(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn float_all( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Tests if all elements in the float
tensor evaluate to True. Read moreSource§fn float_all_dim(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn float_all_dim( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
Source§fn float_sign(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_sign( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Returns the signs of the float
tensor. Read moreSource§fn float_sort_with_indices(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
descending: bool,
) -> (<B as Backend>::FloatTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn float_sort_with_indices( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, descending: bool, ) -> (<B as Backend>::FloatTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Sort the elements of the input
tensor by value in along a given dimension. Read moreSource§fn float_grid_sample_2d(
tensor: <B as Backend>::FloatTensorPrimitive,
grid: <B as Backend>::FloatTensorPrimitive,
options: GridSampleOptions,
) -> <B as Backend>::FloatTensorPrimitive
fn float_grid_sample_2d( tensor: <B as Backend>::FloatTensorPrimitive, grid: <B as Backend>::FloatTensorPrimitive, options: GridSampleOptions, ) -> <B as Backend>::FloatTensorPrimitive
Samples tensor as a two-dimensional spatial grid of (possibly multi-channel) values,
using the given locations in [-1, 1]. Read more
Source§fn float_is_nan(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn float_is_nan( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Returns a new tensor with boolean elements indicating whether each element of the input is NaN. Read more
Source§fn float_is_inf(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn float_is_inf( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Returns a new tensor with boolean elements indicating whether each element of the input is infinite (either +INF or -INF). Read more
Source§impl IntTensorOps<MpsGraph> for MpsGraph
impl IntTensorOps<MpsGraph> for MpsGraph
Source§fn int_empty(
shape: Shape,
device: &Device<MpsGraph>,
dtype: IntDType,
) -> IntTensor<MpsGraph>
fn int_empty( shape: Shape, device: &Device<MpsGraph>, dtype: IntDType, ) -> IntTensor<MpsGraph>
Creates a new int tensor. Read more
Source§fn int_into_data(
t: IntTensor<MpsGraph>,
) -> impl Future<Output = Result<TensorData, ExecutionError>> + Send
fn int_into_data( t: IntTensor<MpsGraph>, ) -> impl Future<Output = Result<TensorData, ExecutionError>> + Send
Converts the tensor to a data structure. Read more
Source§fn int_from_data(
data: TensorData,
device: &Device<MpsGraph>,
) -> IntTensor<MpsGraph>
fn int_from_data( data: TensorData, device: &Device<MpsGraph>, ) -> IntTensor<MpsGraph>
Creates a tensor from the data structure. Read more
Source§fn int_device(t: &IntTensor<MpsGraph>) -> Device<MpsGraph>
fn int_device(t: &IntTensor<MpsGraph>) -> Device<MpsGraph>
Gets the device of the tensor. Read more
Source§fn int_to_device(
t: IntTensor<MpsGraph>,
d: &Device<MpsGraph>,
) -> IntTensor<MpsGraph>
fn int_to_device( t: IntTensor<MpsGraph>, d: &Device<MpsGraph>, ) -> IntTensor<MpsGraph>
Moves the tensor to the given device.
Source§fn int_reshape(t: IntTensor<MpsGraph>, shape: Shape) -> IntTensor<MpsGraph>
fn int_reshape(t: IntTensor<MpsGraph>, shape: Shape) -> IntTensor<MpsGraph>
Reshapes the tensor. Read more
Source§fn int_slice(t: IntTensor<MpsGraph>, slices: &[Slice]) -> IntTensor<MpsGraph>
fn int_slice(t: IntTensor<MpsGraph>, slices: &[Slice]) -> IntTensor<MpsGraph>
Gets the element at the given indices. Read more
Source§fn int_slice_assign(
t: IntTensor<MpsGraph>,
slices: &[Slice],
v: IntTensor<MpsGraph>,
) -> IntTensor<MpsGraph>
fn int_slice_assign( t: IntTensor<MpsGraph>, slices: &[Slice], v: IntTensor<MpsGraph>, ) -> IntTensor<MpsGraph>
Sets the values in the tensor for the given ranges. Read more
Source§fn int_into_float(t: IntTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn int_into_float(t: IntTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Converts int tensor to float tensor. Read more
Source§fn int_mask_where(
t: IntTensor<MpsGraph>,
m: BoolTensor<MpsGraph>,
v: IntTensor<MpsGraph>,
) -> IntTensor<MpsGraph>
fn int_mask_where( t: IntTensor<MpsGraph>, m: BoolTensor<MpsGraph>, v: IntTensor<MpsGraph>, ) -> IntTensor<MpsGraph>
Fills the tensor with values from the value tensor if the mask is true at the given
indices. Read more
Source§fn int_mask_fill(
t: IntTensor<MpsGraph>,
m: BoolTensor<MpsGraph>,
v: Scalar,
) -> IntTensor<MpsGraph>
fn int_mask_fill( t: IntTensor<MpsGraph>, m: BoolTensor<MpsGraph>, v: Scalar, ) -> IntTensor<MpsGraph>
Fills the tensor with the given value if the mask is true at the given indices. Read more
Source§fn int_gather(
dim: usize,
t: IntTensor<MpsGraph>,
idx: IntTensor<MpsGraph>,
) -> IntTensor<MpsGraph>
fn int_gather( dim: usize, t: IntTensor<MpsGraph>, idx: IntTensor<MpsGraph>, ) -> IntTensor<MpsGraph>
Gather elements from the tensor at the given indices. Read more
Source§fn int_scatter_add(
dim: usize,
t: IntTensor<MpsGraph>,
idx: IntTensor<MpsGraph>,
v: IntTensor<MpsGraph>,
) -> IntTensor<MpsGraph>
fn int_scatter_add( dim: usize, t: IntTensor<MpsGraph>, idx: IntTensor<MpsGraph>, v: IntTensor<MpsGraph>, ) -> IntTensor<MpsGraph>
Scatter a given value to the tensor at the given indices using sum reduction. Read more
Source§fn int_select(
t: IntTensor<MpsGraph>,
dim: usize,
idx: IntTensor<MpsGraph>,
) -> IntTensor<MpsGraph>
fn int_select( t: IntTensor<MpsGraph>, dim: usize, idx: IntTensor<MpsGraph>, ) -> IntTensor<MpsGraph>
Select tensor elements along the given dimension corresponding to the given indices. Read more
Source§fn int_select_add(
t: IntTensor<MpsGraph>,
dim: usize,
idx: IntTensor<MpsGraph>,
v: IntTensor<MpsGraph>,
) -> IntTensor<MpsGraph>
fn int_select_add( t: IntTensor<MpsGraph>, dim: usize, idx: IntTensor<MpsGraph>, v: IntTensor<MpsGraph>, ) -> IntTensor<MpsGraph>
Assign the selected elements along the given dimension corresponding to the given indices
to the given value using sum reduction. Read more
Source§fn int_equal(
a: IntTensor<MpsGraph>,
b: IntTensor<MpsGraph>,
) -> BoolTensor<MpsGraph>
fn int_equal( a: IntTensor<MpsGraph>, b: IntTensor<MpsGraph>, ) -> BoolTensor<MpsGraph>
Element-wise equality comparison. Read more
Source§fn int_equal_elem(a: IntTensor<MpsGraph>, b: Scalar) -> BoolTensor<MpsGraph>
fn int_equal_elem(a: IntTensor<MpsGraph>, b: Scalar) -> BoolTensor<MpsGraph>
Element-wise equality comparison with a scalar. Read more
Source§fn int_greater(
a: IntTensor<MpsGraph>,
b: IntTensor<MpsGraph>,
) -> BoolTensor<MpsGraph>
fn int_greater( a: IntTensor<MpsGraph>, b: IntTensor<MpsGraph>, ) -> BoolTensor<MpsGraph>
Element-wise greater than comparison. Read more
Source§fn int_greater_elem(a: IntTensor<MpsGraph>, b: Scalar) -> BoolTensor<MpsGraph>
fn int_greater_elem(a: IntTensor<MpsGraph>, b: Scalar) -> BoolTensor<MpsGraph>
Element-wise greater than comparison with a scalar. Read more
Source§fn int_greater_equal(
a: IntTensor<MpsGraph>,
b: IntTensor<MpsGraph>,
) -> BoolTensor<MpsGraph>
fn int_greater_equal( a: IntTensor<MpsGraph>, b: IntTensor<MpsGraph>, ) -> BoolTensor<MpsGraph>
Element-wise greater than or equal comparison. Read more
Source§fn int_greater_equal_elem(
a: IntTensor<MpsGraph>,
b: Scalar,
) -> BoolTensor<MpsGraph>
fn int_greater_equal_elem( a: IntTensor<MpsGraph>, b: Scalar, ) -> BoolTensor<MpsGraph>
Element-wise greater than or equal comparison with a scalar. Read more
Source§fn int_lower(
a: IntTensor<MpsGraph>,
b: IntTensor<MpsGraph>,
) -> BoolTensor<MpsGraph>
fn int_lower( a: IntTensor<MpsGraph>, b: IntTensor<MpsGraph>, ) -> BoolTensor<MpsGraph>
Element-wise less than comparison. Read more
Source§fn int_lower_elem(a: IntTensor<MpsGraph>, b: Scalar) -> BoolTensor<MpsGraph>
fn int_lower_elem(a: IntTensor<MpsGraph>, b: Scalar) -> BoolTensor<MpsGraph>
Element-wise less than comparison with a scalar. Read more
Source§fn int_lower_equal(
a: IntTensor<MpsGraph>,
b: IntTensor<MpsGraph>,
) -> BoolTensor<MpsGraph>
fn int_lower_equal( a: IntTensor<MpsGraph>, b: IntTensor<MpsGraph>, ) -> BoolTensor<MpsGraph>
Element-wise less than or equal comparison. Read more
Source§fn int_lower_equal_elem(
a: IntTensor<MpsGraph>,
b: Scalar,
) -> BoolTensor<MpsGraph>
fn int_lower_equal_elem( a: IntTensor<MpsGraph>, b: Scalar, ) -> BoolTensor<MpsGraph>
Element-wise less than or equal comparison with a scalar. Read more
Source§fn int_add(
a: IntTensor<MpsGraph>,
b: IntTensor<MpsGraph>,
) -> IntTensor<MpsGraph>
fn int_add( a: IntTensor<MpsGraph>, b: IntTensor<MpsGraph>, ) -> IntTensor<MpsGraph>
Element-wise addition. Read more
Source§fn int_add_scalar(a: IntTensor<MpsGraph>, b: Scalar) -> IntTensor<MpsGraph>
fn int_add_scalar(a: IntTensor<MpsGraph>, b: Scalar) -> IntTensor<MpsGraph>
Element-wise addition with a scalar. Read more
Source§fn int_sub(
a: IntTensor<MpsGraph>,
b: IntTensor<MpsGraph>,
) -> IntTensor<MpsGraph>
fn int_sub( a: IntTensor<MpsGraph>, b: IntTensor<MpsGraph>, ) -> IntTensor<MpsGraph>
Element-wise subtraction. Read more
Source§fn int_sub_scalar(a: IntTensor<MpsGraph>, b: Scalar) -> IntTensor<MpsGraph>
fn int_sub_scalar(a: IntTensor<MpsGraph>, b: Scalar) -> IntTensor<MpsGraph>
Element-wise subtraction with a scalar. Read more
Source§fn int_mul(
a: IntTensor<MpsGraph>,
b: IntTensor<MpsGraph>,
) -> IntTensor<MpsGraph>
fn int_mul( a: IntTensor<MpsGraph>, b: IntTensor<MpsGraph>, ) -> IntTensor<MpsGraph>
Element-wise multiplication. Read more
Source§fn int_mul_scalar(a: IntTensor<MpsGraph>, b: Scalar) -> IntTensor<MpsGraph>
fn int_mul_scalar(a: IntTensor<MpsGraph>, b: Scalar) -> IntTensor<MpsGraph>
Element-wise multiplication with a scalar. Read more
Source§fn int_div(
a: IntTensor<MpsGraph>,
b: IntTensor<MpsGraph>,
) -> IntTensor<MpsGraph>
fn int_div( a: IntTensor<MpsGraph>, b: IntTensor<MpsGraph>, ) -> IntTensor<MpsGraph>
Element-wise division. Read more
Source§fn int_div_scalar(a: IntTensor<MpsGraph>, b: Scalar) -> IntTensor<MpsGraph>
fn int_div_scalar(a: IntTensor<MpsGraph>, b: Scalar) -> IntTensor<MpsGraph>
Element-wise division with a scalar. Read more
Source§fn int_remainder(
a: IntTensor<MpsGraph>,
b: IntTensor<MpsGraph>,
) -> IntTensor<MpsGraph>
fn int_remainder( a: IntTensor<MpsGraph>, b: IntTensor<MpsGraph>, ) -> IntTensor<MpsGraph>
Element-wise modulus. Read more
Source§fn int_remainder_scalar(
a: IntTensor<MpsGraph>,
b: Scalar,
) -> IntTensor<MpsGraph>
fn int_remainder_scalar( a: IntTensor<MpsGraph>, b: Scalar, ) -> IntTensor<MpsGraph>
Element-wise modulus with a scalar. Read more
Source§fn int_matmul(
a: IntTensor<MpsGraph>,
b: IntTensor<MpsGraph>,
) -> IntTensor<MpsGraph>
fn int_matmul( a: IntTensor<MpsGraph>, b: IntTensor<MpsGraph>, ) -> IntTensor<MpsGraph>
Multiplies two tensors together using matrix multiplication. Read more
Source§fn int_abs(t: IntTensor<MpsGraph>) -> IntTensor<MpsGraph>
fn int_abs(t: IntTensor<MpsGraph>) -> IntTensor<MpsGraph>
Returns a new tensor with absolute values. Read more
Source§fn int_swap_dims(
t: IntTensor<MpsGraph>,
d1: usize,
d2: usize,
) -> IntTensor<MpsGraph>
fn int_swap_dims( t: IntTensor<MpsGraph>, d1: usize, d2: usize, ) -> IntTensor<MpsGraph>
Swaps two dimensions of an int tensor. Read more
Source§fn int_permute(t: IntTensor<MpsGraph>, axes: &[usize]) -> IntTensor<MpsGraph>
fn int_permute(t: IntTensor<MpsGraph>, axes: &[usize]) -> IntTensor<MpsGraph>
Permutes the dimensions of a tensor. Read more
Source§fn int_flip(t: IntTensor<MpsGraph>, axes: &[usize]) -> IntTensor<MpsGraph>
fn int_flip(t: IntTensor<MpsGraph>, axes: &[usize]) -> IntTensor<MpsGraph>
Reverse the order of elements in a tensor along the given axes. Read more
Source§fn int_expand(t: IntTensor<MpsGraph>, shape: Shape) -> IntTensor<MpsGraph>
fn int_expand(t: IntTensor<MpsGraph>, shape: Shape) -> IntTensor<MpsGraph>
Broadcasts the int
tensor to the given shape.Source§fn int_sum(t: IntTensor<MpsGraph>) -> IntTensor<MpsGraph>
fn int_sum(t: IntTensor<MpsGraph>) -> IntTensor<MpsGraph>
Sums all elements in the tensor. Read more
Source§fn int_sum_dim(t: IntTensor<MpsGraph>, dim: usize) -> IntTensor<MpsGraph>
fn int_sum_dim(t: IntTensor<MpsGraph>, dim: usize) -> IntTensor<MpsGraph>
Sums all elements in the tensor along a dimension. Read more
Source§fn int_prod(t: IntTensor<MpsGraph>) -> IntTensor<MpsGraph>
fn int_prod(t: IntTensor<MpsGraph>) -> IntTensor<MpsGraph>
Computes the product of all elements in the tensor. Read more
Source§fn int_prod_dim(t: IntTensor<MpsGraph>, dim: usize) -> IntTensor<MpsGraph>
fn int_prod_dim(t: IntTensor<MpsGraph>, dim: usize) -> IntTensor<MpsGraph>
Computes the product of all elements in the tensor along a dimension. Read more
Source§fn int_mean_dim(t: IntTensor<MpsGraph>, dim: usize) -> IntTensor<MpsGraph>
fn int_mean_dim(t: IntTensor<MpsGraph>, dim: usize) -> IntTensor<MpsGraph>
Computes the mean of all elements in the tensor along a dimension. Read more
Source§fn int_cumsum(t: IntTensor<MpsGraph>, d: usize) -> IntTensor<MpsGraph>
fn int_cumsum(t: IntTensor<MpsGraph>, d: usize) -> IntTensor<MpsGraph>
Computes the cumulative sum of elements along a dimension. Read more
Source§fn int_cumprod(t: IntTensor<MpsGraph>, d: usize) -> IntTensor<MpsGraph>
fn int_cumprod(t: IntTensor<MpsGraph>, d: usize) -> IntTensor<MpsGraph>
Computes the cumulative product of elements along a dimension. Read more
Source§fn int_cummin(t: IntTensor<MpsGraph>, d: usize) -> IntTensor<MpsGraph>
fn int_cummin(t: IntTensor<MpsGraph>, d: usize) -> IntTensor<MpsGraph>
Computes the cumulative minimum of elements along a dimension. Read more
Source§fn int_cummax(t: IntTensor<MpsGraph>, d: usize) -> IntTensor<MpsGraph>
fn int_cummax(t: IntTensor<MpsGraph>, d: usize) -> IntTensor<MpsGraph>
Computes the cumulative maximum of elements along a dimension. Read more
Source§fn int_argmax(t: IntTensor<MpsGraph>, dim: usize) -> IntTensor<MpsGraph>
fn int_argmax(t: IntTensor<MpsGraph>, dim: usize) -> IntTensor<MpsGraph>
Gets the indices of the maximum elements along a dimension. Read more
Source§fn int_argmin(t: IntTensor<MpsGraph>, dim: usize) -> IntTensor<MpsGraph>
fn int_argmin(t: IntTensor<MpsGraph>, dim: usize) -> IntTensor<MpsGraph>
Gets the indices of the minimum elements along a dimension. Read more
Source§fn int_random(
shape: Shape,
dist: Distribution,
device: &Device<MpsGraph>,
) -> IntTensor<MpsGraph>
fn int_random( shape: Shape, dist: Distribution, device: &Device<MpsGraph>, ) -> IntTensor<MpsGraph>
Creates a new int tensor with random values. Read more
Source§fn int_sort(
t: IntTensor<MpsGraph>,
dim: usize,
desc: bool,
) -> IntTensor<MpsGraph>
fn int_sort( t: IntTensor<MpsGraph>, dim: usize, desc: bool, ) -> IntTensor<MpsGraph>
Sort the elements of the input
tensor by value along a given dimension. Read moreSource§fn int_argsort(
t: IntTensor<MpsGraph>,
dim: usize,
desc: bool,
) -> IntTensor<MpsGraph>
fn int_argsort( t: IntTensor<MpsGraph>, dim: usize, desc: bool, ) -> IntTensor<MpsGraph>
Returns the indices that sort the elements of the input
tensor by value
along a given dimension. Read moreSource§fn bitwise_and(
a: IntTensor<MpsGraph>,
b: IntTensor<MpsGraph>,
) -> IntTensor<MpsGraph>
fn bitwise_and( a: IntTensor<MpsGraph>, b: IntTensor<MpsGraph>, ) -> IntTensor<MpsGraph>
Bitwise AND operation for Int Tensors
Source§fn bitwise_and_scalar(a: IntTensor<MpsGraph>, b: Scalar) -> IntTensor<MpsGraph>
fn bitwise_and_scalar(a: IntTensor<MpsGraph>, b: Scalar) -> IntTensor<MpsGraph>
Bitwise AND operation for Int Tensors with a scalar
Source§fn bitwise_or(
a: IntTensor<MpsGraph>,
b: IntTensor<MpsGraph>,
) -> IntTensor<MpsGraph>
fn bitwise_or( a: IntTensor<MpsGraph>, b: IntTensor<MpsGraph>, ) -> IntTensor<MpsGraph>
Bitwise OR operation for Int Tensors
Source§fn bitwise_or_scalar(a: IntTensor<MpsGraph>, b: Scalar) -> IntTensor<MpsGraph>
fn bitwise_or_scalar(a: IntTensor<MpsGraph>, b: Scalar) -> IntTensor<MpsGraph>
Bitwise OR operation for Int Tensors with a scalar
Source§fn bitwise_xor(
a: IntTensor<MpsGraph>,
b: IntTensor<MpsGraph>,
) -> IntTensor<MpsGraph>
fn bitwise_xor( a: IntTensor<MpsGraph>, b: IntTensor<MpsGraph>, ) -> IntTensor<MpsGraph>
Bitwise XOR operation for Int Tensors
Source§fn bitwise_xor_scalar(a: IntTensor<MpsGraph>, b: Scalar) -> IntTensor<MpsGraph>
fn bitwise_xor_scalar(a: IntTensor<MpsGraph>, b: Scalar) -> IntTensor<MpsGraph>
Bitwise XOR operation for Int Tensors with a scalar
Source§fn bitwise_not(t: IntTensor<MpsGraph>) -> IntTensor<MpsGraph>
fn bitwise_not(t: IntTensor<MpsGraph>) -> IntTensor<MpsGraph>
Bitwise NOT operation for Int Tensors
Source§fn bitwise_left_shift(
a: IntTensor<MpsGraph>,
b: IntTensor<MpsGraph>,
) -> IntTensor<MpsGraph>
fn bitwise_left_shift( a: IntTensor<MpsGraph>, b: IntTensor<MpsGraph>, ) -> IntTensor<MpsGraph>
Bitwise left shift operation for Int Tensors
Source§fn bitwise_left_shift_scalar(
a: IntTensor<MpsGraph>,
b: Scalar,
) -> IntTensor<MpsGraph>
fn bitwise_left_shift_scalar( a: IntTensor<MpsGraph>, b: Scalar, ) -> IntTensor<MpsGraph>
Bitwise left shift operation for Int Tensors with a scalar
Source§fn bitwise_right_shift(
a: IntTensor<MpsGraph>,
b: IntTensor<MpsGraph>,
) -> IntTensor<MpsGraph>
fn bitwise_right_shift( a: IntTensor<MpsGraph>, b: IntTensor<MpsGraph>, ) -> IntTensor<MpsGraph>
Bitwise right shift operation for Int Tensors
Source§fn bitwise_right_shift_scalar(
a: IntTensor<MpsGraph>,
b: Scalar,
) -> IntTensor<MpsGraph>
fn bitwise_right_shift_scalar( a: IntTensor<MpsGraph>, b: Scalar, ) -> IntTensor<MpsGraph>
Bitwise right shift operation for Int Tensors with a scalar
Source§fn int_unfold(
t: IntTensor<MpsGraph>,
dim: usize,
size: usize,
step: usize,
) -> IntTensor<MpsGraph>
fn int_unfold( t: IntTensor<MpsGraph>, dim: usize, size: usize, step: usize, ) -> IntTensor<MpsGraph>
Unfold windows along a dimension. Read more
Source§fn int_cat(tensors: Vec<IntTensor<MpsGraph>>, dim: usize) -> IntTensor<MpsGraph>
fn int_cat(tensors: Vec<IntTensor<MpsGraph>>, dim: usize) -> IntTensor<MpsGraph>
Concatenates the given tensors along the given dimension. Read more
Source§fn int_cast(t: IntTensor<MpsGraph>, dtype: IntDType) -> IntTensor<MpsGraph>
fn int_cast(t: IntTensor<MpsGraph>, dtype: IntDType) -> IntTensor<MpsGraph>
Converts a tensor to another integer data type. Read more
Source§fn int_repeat_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
times: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_repeat_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, times: usize, ) -> <B as Backend>::IntTensorPrimitive
Repeats the tensor along the given dimension the given number of times. Read more
Source§fn int_not_equal(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn int_not_equal( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise non-equality comparison. Read more
Source§fn int_not_equal_elem(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: Scalar,
) -> <B as Backend>::BoolTensorPrimitive
fn int_not_equal_elem( lhs: <B as Backend>::IntTensorPrimitive, rhs: Scalar, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise non-equality comparison with a scalar. Read more
Source§fn int_powi(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_powi( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Element-wise power with a IntTensor. Read more
Source§fn int_powf(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_powf( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Element-wise power with a floatTensor. Read more
Source§fn int_powi_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: Scalar,
) -> <B as Backend>::IntTensorPrimitive
fn int_powi_scalar( lhs: <B as Backend>::IntTensorPrimitive, rhs: Scalar, ) -> <B as Backend>::IntTensorPrimitive
Element-wise power with a scalar. Read more
Source§fn int_powi_scalar_impl(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: Scalar,
) -> <B as Backend>::IntTensorPrimitive
fn int_powi_scalar_impl( lhs: <B as Backend>::IntTensorPrimitive, rhs: Scalar, ) -> <B as Backend>::IntTensorPrimitive
Element-wise power with a scalar. Read more
Source§fn int_powf_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: Scalar,
) -> <B as Backend>::IntTensorPrimitive
fn int_powf_scalar( lhs: <B as Backend>::IntTensorPrimitive, rhs: Scalar, ) -> <B as Backend>::IntTensorPrimitive
Element-wise power with a floatTensor. Read more
Source§fn int_powf_scalar_impl(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: Scalar,
) -> <B as Backend>::IntTensorPrimitive
fn int_powf_scalar_impl( lhs: <B as Backend>::IntTensorPrimitive, rhs: Scalar, ) -> <B as Backend>::IntTensorPrimitive
Element-wise power with a floatTensor. Read more
Source§fn int_clamp_min(
tensor: <B as Backend>::IntTensorPrimitive,
min: Scalar,
) -> <B as Backend>::IntTensorPrimitive
fn int_clamp_min( tensor: <B as Backend>::IntTensorPrimitive, min: Scalar, ) -> <B as Backend>::IntTensorPrimitive
Clamps a tensor under a minimum value. Read more
Source§fn int_clamp_max(
tensor: <B as Backend>::IntTensorPrimitive,
max: Scalar,
) -> <B as Backend>::IntTensorPrimitive
fn int_clamp_max( tensor: <B as Backend>::IntTensorPrimitive, max: Scalar, ) -> <B as Backend>::IntTensorPrimitive
Clamps a tensor over a maximum value. Read more
Source§fn int_clamp(
tensor: <B as Backend>::IntTensorPrimitive,
min: Scalar,
max: Scalar,
) -> <B as Backend>::IntTensorPrimitive
fn int_clamp( tensor: <B as Backend>::IntTensorPrimitive, min: Scalar, max: Scalar, ) -> <B as Backend>::IntTensorPrimitive
Clamps a tensor between a minimum and maximum value. Read more
Source§fn int_zeros(
shape: Shape,
device: &<B as Backend>::Device,
dtype: IntDType,
) -> <B as Backend>::IntTensorPrimitive
fn int_zeros( shape: Shape, device: &<B as Backend>::Device, dtype: IntDType, ) -> <B as Backend>::IntTensorPrimitive
Creates a tensor of zeros. Read more
Source§fn int_ones(
shape: Shape,
device: &<B as Backend>::Device,
dtype: IntDType,
) -> <B as Backend>::IntTensorPrimitive
fn int_ones( shape: Shape, device: &<B as Backend>::Device, dtype: IntDType, ) -> <B as Backend>::IntTensorPrimitive
Creates a tensor of ones. Read more
Source§fn int_full(
shape: Shape,
fill_value: Scalar,
device: &<B as Backend>::Device,
dtype: IntDType,
) -> <B as Backend>::IntTensorPrimitive
fn int_full( shape: Shape, fill_value: Scalar, device: &<B as Backend>::Device, dtype: IntDType, ) -> <B as Backend>::IntTensorPrimitive
Creates a tensor filled with given value. Read more
Source§fn int_mean(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_mean( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Computes the mean of all elements in the tensor. Read more
Source§fn int_max(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_max( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Gets the maximum element in the tensor. Read more
Source§fn int_max_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_max_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Gets the maximum element in the tensor along a dimension. Read more
Source§fn int_max_dim_with_indices(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> (<B as Backend>::IntTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn int_max_dim_with_indices( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> (<B as Backend>::IntTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Gets the maximum elements and corresponding indices along a dimension. Read more
Source§fn int_max_abs(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_max_abs( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Gets the maximum absolute element in the tensor. Read more
Source§fn int_max_abs_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_max_abs_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Gets the maximum absolute element in the tensor along a dimension. Read more
Source§fn int_min(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_min( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Gets the minimum element in the tensor. Read more
Source§fn int_min_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_min_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Gets the minimum elements in the tensor along a dimension. Read more
Source§fn int_min_dim_with_indices(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> (<B as Backend>::IntTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn int_min_dim_with_indices( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> (<B as Backend>::IntTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Gets the minimum elements and corresponding indices along a dimension. Read more
Source§fn int_transpose(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_transpose( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Transposes an int tensor. Read more
Source§fn int_arange_step(
range: Range<i64>,
step: usize,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive
fn int_arange_step( range: Range<i64>, step: usize, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive
Creates a new tensor with values from the given range with the given step size. Read more
Source§fn int_arange(
range: Range<i64>,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive
fn int_arange( range: Range<i64>, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive
Creates a new tensor with values from the given range. Read more
Source§fn int_any(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn int_any( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Tests if any element in the int
tensor evaluates to True. Read moreSource§fn int_any_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn int_any_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
Source§fn int_all(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn int_all( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Tests if all elements in the int
tensor evaluate to True. Read moreSource§fn int_all_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn int_all_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
Source§fn int_sign(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_sign( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Returns the signs of the int
tensor. Read moreSource§fn int_sort_with_indices(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
descending: bool,
) -> (<B as Backend>::IntTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn int_sort_with_indices( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, descending: bool, ) -> (<B as Backend>::IntTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Sort the elements of the input
tensor by value along a given dimension. Read moreSource§impl ModuleOps<MpsGraph> for MpsGraph
impl ModuleOps<MpsGraph> for MpsGraph
Source§fn embedding(
w: FloatTensor<MpsGraph>,
idx: IntTensor<MpsGraph>,
) -> FloatTensor<MpsGraph>
fn embedding( w: FloatTensor<MpsGraph>, idx: IntTensor<MpsGraph>, ) -> FloatTensor<MpsGraph>
Embedding operation. Read more
Source§fn embedding_backward(
w: FloatTensor<MpsGraph>,
grad: FloatTensor<MpsGraph>,
idx: IntTensor<MpsGraph>,
) -> FloatTensor<MpsGraph>
fn embedding_backward( w: FloatTensor<MpsGraph>, grad: FloatTensor<MpsGraph>, idx: IntTensor<MpsGraph>, ) -> FloatTensor<MpsGraph>
Embedding backward operation. Read more
Source§fn conv1d(
x: FloatTensor<MpsGraph>,
w: FloatTensor<MpsGraph>,
b: Option<FloatTensor<MpsGraph>>,
o: ConvOptions<1>,
) -> FloatTensor<MpsGraph>
fn conv1d( x: FloatTensor<MpsGraph>, w: FloatTensor<MpsGraph>, b: Option<FloatTensor<MpsGraph>>, o: ConvOptions<1>, ) -> FloatTensor<MpsGraph>
One dimensional convolution. Read more
Source§fn conv2d(
x: FloatTensor<MpsGraph>,
w: FloatTensor<MpsGraph>,
b: Option<FloatTensor<MpsGraph>>,
o: ConvOptions<2>,
) -> FloatTensor<MpsGraph>
fn conv2d( x: FloatTensor<MpsGraph>, w: FloatTensor<MpsGraph>, b: Option<FloatTensor<MpsGraph>>, o: ConvOptions<2>, ) -> FloatTensor<MpsGraph>
Two dimensional convolution. Read more
Source§fn conv3d(
x: FloatTensor<MpsGraph>,
w: FloatTensor<MpsGraph>,
b: Option<FloatTensor<MpsGraph>>,
o: ConvOptions<3>,
) -> FloatTensor<MpsGraph>
fn conv3d( x: FloatTensor<MpsGraph>, w: FloatTensor<MpsGraph>, b: Option<FloatTensor<MpsGraph>>, o: ConvOptions<3>, ) -> FloatTensor<MpsGraph>
Three dimensional convolution. Read more
Source§fn deform_conv2d(
x: FloatTensor<MpsGraph>,
offset: FloatTensor<MpsGraph>,
weight: FloatTensor<MpsGraph>,
mask: Option<FloatTensor<MpsGraph>>,
bias: Option<FloatTensor<MpsGraph>>,
o: DeformConvOptions<2>,
) -> FloatTensor<MpsGraph>
fn deform_conv2d( x: FloatTensor<MpsGraph>, offset: FloatTensor<MpsGraph>, weight: FloatTensor<MpsGraph>, mask: Option<FloatTensor<MpsGraph>>, bias: Option<FloatTensor<MpsGraph>>, o: DeformConvOptions<2>, ) -> FloatTensor<MpsGraph>
Two dimensional deformable convolution. Read more
Source§fn deform_conv2d_backward(
x: FloatTensor<MpsGraph>,
offset: FloatTensor<MpsGraph>,
weight: FloatTensor<MpsGraph>,
mask: Option<FloatTensor<MpsGraph>>,
bias: Option<FloatTensor<MpsGraph>>,
output_grad: FloatTensor<MpsGraph>,
_o: DeformConvOptions<2>,
) -> DeformConv2dBackward<MpsGraph>
fn deform_conv2d_backward( x: FloatTensor<MpsGraph>, offset: FloatTensor<MpsGraph>, weight: FloatTensor<MpsGraph>, mask: Option<FloatTensor<MpsGraph>>, bias: Option<FloatTensor<MpsGraph>>, output_grad: FloatTensor<MpsGraph>, _o: DeformConvOptions<2>, ) -> DeformConv2dBackward<MpsGraph>
Backward pass for the deform_conv2d operation.
Source§fn conv_transpose1d(
x: FloatTensor<MpsGraph>,
w: FloatTensor<MpsGraph>,
b: Option<FloatTensor<MpsGraph>>,
o: ConvTransposeOptions<1>,
) -> FloatTensor<MpsGraph>
fn conv_transpose1d( x: FloatTensor<MpsGraph>, w: FloatTensor<MpsGraph>, b: Option<FloatTensor<MpsGraph>>, o: ConvTransposeOptions<1>, ) -> FloatTensor<MpsGraph>
One dimensional transposed convolution. Read more
Source§fn conv_transpose2d(
x: FloatTensor<MpsGraph>,
w: FloatTensor<MpsGraph>,
b: Option<FloatTensor<MpsGraph>>,
o: ConvTransposeOptions<2>,
) -> FloatTensor<MpsGraph>
fn conv_transpose2d( x: FloatTensor<MpsGraph>, w: FloatTensor<MpsGraph>, b: Option<FloatTensor<MpsGraph>>, o: ConvTransposeOptions<2>, ) -> FloatTensor<MpsGraph>
Two dimensional transposed convolution. Read more
Source§fn conv_transpose3d(
x: FloatTensor<MpsGraph>,
w: FloatTensor<MpsGraph>,
b: Option<FloatTensor<MpsGraph>>,
o: ConvTransposeOptions<3>,
) -> FloatTensor<MpsGraph>
fn conv_transpose3d( x: FloatTensor<MpsGraph>, w: FloatTensor<MpsGraph>, b: Option<FloatTensor<MpsGraph>>, o: ConvTransposeOptions<3>, ) -> FloatTensor<MpsGraph>
Three dimensional transposed convolution. Read more
Source§fn avg_pool2d(
x: FloatTensor<MpsGraph>,
ks: [usize; 2],
stride: [usize; 2],
pad: [usize; 2],
count_include_pad: bool,
_ceil: bool,
) -> FloatTensor<MpsGraph>
fn avg_pool2d( x: FloatTensor<MpsGraph>, ks: [usize; 2], stride: [usize; 2], pad: [usize; 2], count_include_pad: bool, _ceil: bool, ) -> FloatTensor<MpsGraph>
Two dimensional avg pooling. Read more
Source§fn avg_pool2d_backward(
x: FloatTensor<MpsGraph>,
grad: FloatTensor<MpsGraph>,
ks: [usize; 2],
stride: [usize; 2],
pad: [usize; 2],
count_include_pad: bool,
_ceil: bool,
) -> FloatTensor<MpsGraph>
fn avg_pool2d_backward( x: FloatTensor<MpsGraph>, grad: FloatTensor<MpsGraph>, ks: [usize; 2], stride: [usize; 2], pad: [usize; 2], count_include_pad: bool, _ceil: bool, ) -> FloatTensor<MpsGraph>
Backward pass for the avg pooling 2d operation.
Source§fn adaptive_avg_pool2d(
x: FloatTensor<MpsGraph>,
out: [usize; 2],
) -> FloatTensor<MpsGraph>
fn adaptive_avg_pool2d( x: FloatTensor<MpsGraph>, out: [usize; 2], ) -> FloatTensor<MpsGraph>
Two dimensional adaptive avg pooling. Read more
Source§fn adaptive_avg_pool2d_backward(
x: FloatTensor<MpsGraph>,
grad: FloatTensor<MpsGraph>,
) -> FloatTensor<MpsGraph>
fn adaptive_avg_pool2d_backward( x: FloatTensor<MpsGraph>, grad: FloatTensor<MpsGraph>, ) -> FloatTensor<MpsGraph>
Backward pass for the adaptive avg pooling 2d operation.
Source§fn max_pool2d(
x: FloatTensor<MpsGraph>,
ks: [usize; 2],
stride: [usize; 2],
pad: [usize; 2],
dil: [usize; 2],
_ceil: bool,
) -> FloatTensor<MpsGraph>
fn max_pool2d( x: FloatTensor<MpsGraph>, ks: [usize; 2], stride: [usize; 2], pad: [usize; 2], dil: [usize; 2], _ceil: bool, ) -> FloatTensor<MpsGraph>
Two dimensional max pooling. Read more
Source§fn max_pool2d_with_indices(
x: FloatTensor<MpsGraph>,
ks: [usize; 2],
stride: [usize; 2],
pad: [usize; 2],
dil: [usize; 2],
_ceil: bool,
) -> MaxPool2dWithIndices<MpsGraph>
fn max_pool2d_with_indices( x: FloatTensor<MpsGraph>, ks: [usize; 2], stride: [usize; 2], pad: [usize; 2], dil: [usize; 2], _ceil: bool, ) -> MaxPool2dWithIndices<MpsGraph>
Two dimensional max pooling with indices. Read more
Source§fn max_pool2d_with_indices_backward(
x: FloatTensor<MpsGraph>,
ks: [usize; 2],
stride: [usize; 2],
pad: [usize; 2],
dil: [usize; 2],
_ceil: bool,
grad: FloatTensor<MpsGraph>,
idx: IntTensor<MpsGraph>,
) -> MaxPool2dBackward<MpsGraph>
fn max_pool2d_with_indices_backward( x: FloatTensor<MpsGraph>, ks: [usize; 2], stride: [usize; 2], pad: [usize; 2], dil: [usize; 2], _ceil: bool, grad: FloatTensor<MpsGraph>, idx: IntTensor<MpsGraph>, ) -> MaxPool2dBackward<MpsGraph>
Backward pass for the max pooling 2d operation.
Source§fn interpolate(
x: FloatTensor<MpsGraph>,
out_size: [usize; 2],
opts: InterpolateOptions,
) -> FloatTensor<MpsGraph>
fn interpolate( x: FloatTensor<MpsGraph>, out_size: [usize; 2], opts: InterpolateOptions, ) -> FloatTensor<MpsGraph>
Down/up samples the input. Read more
Source§fn interpolate_backward(
x: FloatTensor<MpsGraph>,
grad: FloatTensor<MpsGraph>,
_out_size: [usize; 2],
opts: InterpolateOptions,
) -> FloatTensor<MpsGraph>
fn interpolate_backward( x: FloatTensor<MpsGraph>, grad: FloatTensor<MpsGraph>, _out_size: [usize; 2], opts: InterpolateOptions, ) -> FloatTensor<MpsGraph>
Backward pass for the interpolate operation.
Source§fn attention(
q: FloatTensor<MpsGraph>,
k: FloatTensor<MpsGraph>,
v: FloatTensor<MpsGraph>,
mask: Option<BoolTensor<MpsGraph>>,
_bias: Option<FloatTensor<MpsGraph>>,
_opts: AttentionModuleOptions,
) -> FloatTensor<MpsGraph>
fn attention( q: FloatTensor<MpsGraph>, k: FloatTensor<MpsGraph>, v: FloatTensor<MpsGraph>, mask: Option<BoolTensor<MpsGraph>>, _bias: Option<FloatTensor<MpsGraph>>, _opts: AttentionModuleOptions, ) -> FloatTensor<MpsGraph>
Computes scaled dot-product attention: softmax(QKᵗ * scale) · V,
where scale defaults to 1/sqrt(head_dim). Optionally applies masking,
additive bias, causal masking, and softcap to the attention scores. Read more
Source§fn conv1d_x_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<1>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv1d_x_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvOptions<1>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv1d operation, returning the gradient for
x.Source§fn conv1d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<1>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv1d_weight_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvOptions<1>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv1d operation, returning the gradient for
weight.Source§fn conv1d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn conv1d_bias_backward( x: <B as Backend>::FloatTensorPrimitive, bias: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv1d operation, returning the gradient for
bias.Source§fn conv2d_x_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv2d_x_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvOptions<2>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv2d operation, returning the gradient for
x.Source§fn conv2d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv2d_weight_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvOptions<2>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv2d operation, returning the gradient for
weight.Source§fn conv2d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn conv2d_bias_backward( x: <B as Backend>::FloatTensorPrimitive, bias: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv2d operation, returning the gradient for
bias.Source§fn conv3d_x_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<3>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv3d_x_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvOptions<3>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv3d operation, returning the gradient for
x.Source§fn conv3d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<3>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv3d_weight_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvOptions<3>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv3d operation, returning the gradient for
weight.Source§fn conv3d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn conv3d_bias_backward( x: <B as Backend>::FloatTensorPrimitive, bias: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv3d operation, returning the gradient for
bias.Source§fn conv_transpose1d_x_backward(
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<1>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose1d_x_backward( weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvTransposeOptions<1>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 1d operation, returning the gradient for
x.Source§fn conv_transpose1d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<1>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose1d_weight_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvTransposeOptions<1>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 1d operation, returning the gradient for
weight.Source§fn conv_transpose1d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose1d_bias_backward( x: <B as Backend>::FloatTensorPrimitive, bias: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 1d operation, returning the gradient for
bias.Source§fn conv_transpose2d_x_backward(
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose2d_x_backward( weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvTransposeOptions<2>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 2d operation, returning the gradient for
x.Source§fn conv_transpose2d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose2d_weight_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvTransposeOptions<2>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 2d operation, returning the gradient for
weight.Source§fn conv_transpose2d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose2d_bias_backward( x: <B as Backend>::FloatTensorPrimitive, bias: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 2d operation, returning the gradient for
bias.Source§fn conv_transpose3d_x_backward(
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<3>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose3d_x_backward( weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvTransposeOptions<3>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 3d operation, returning the gradient for
x.Source§fn conv_transpose3d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<3>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose3d_weight_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvTransposeOptions<3>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 3d operation, returning the gradient for
weight.Source§fn conv_transpose3d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose3d_bias_backward( x: <B as Backend>::FloatTensorPrimitive, bias: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 3d operation, returning the gradient for
bias.Source§fn unfold4d(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: [usize; 2],
options: UnfoldOptions,
) -> <B as Backend>::FloatTensorPrimitive
fn unfold4d( x: <B as Backend>::FloatTensorPrimitive, kernel_size: [usize; 2], options: UnfoldOptions, ) -> <B as Backend>::FloatTensorPrimitive
Four-dimensional unfolding. Read more
Source§fn avg_pool1d(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: usize,
stride: usize,
padding: usize,
count_include_pad: bool,
ceil_mode: bool,
) -> <B as Backend>::FloatTensorPrimitive
fn avg_pool1d( x: <B as Backend>::FloatTensorPrimitive, kernel_size: usize, stride: usize, padding: usize, count_include_pad: bool, ceil_mode: bool, ) -> <B as Backend>::FloatTensorPrimitive
One dimensional avg pooling. Read more
Source§fn avg_pool1d_backward(
x: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
kernel_size: usize,
stride: usize,
padding: usize,
count_include_pad: bool,
ceil_mode: bool,
) -> <B as Backend>::FloatTensorPrimitive
fn avg_pool1d_backward( x: <B as Backend>::FloatTensorPrimitive, grad: <B as Backend>::FloatTensorPrimitive, kernel_size: usize, stride: usize, padding: usize, count_include_pad: bool, ceil_mode: bool, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the avg pooling 1d operation.
Source§fn adaptive_avg_pool1d(
x: <B as Backend>::FloatTensorPrimitive,
output_size: usize,
) -> <B as Backend>::FloatTensorPrimitive
fn adaptive_avg_pool1d( x: <B as Backend>::FloatTensorPrimitive, output_size: usize, ) -> <B as Backend>::FloatTensorPrimitive
One dimensional adaptive avg pooling. Read more
Source§fn adaptive_avg_pool1d_backward(
x: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn adaptive_avg_pool1d_backward( x: <B as Backend>::FloatTensorPrimitive, grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the adaptive avg pooling 1d operation.
Source§fn max_pool1d(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: usize,
stride: usize,
padding: usize,
dilation: usize,
ceil_mode: bool,
) -> <B as Backend>::FloatTensorPrimitive
fn max_pool1d( x: <B as Backend>::FloatTensorPrimitive, kernel_size: usize, stride: usize, padding: usize, dilation: usize, ceil_mode: bool, ) -> <B as Backend>::FloatTensorPrimitive
One dimensional max pooling. Read more
Source§fn max_pool1d_with_indices(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: usize,
stride: usize,
padding: usize,
dilation: usize,
ceil_mode: bool,
) -> MaxPool1dWithIndices<B>
fn max_pool1d_with_indices( x: <B as Backend>::FloatTensorPrimitive, kernel_size: usize, stride: usize, padding: usize, dilation: usize, ceil_mode: bool, ) -> MaxPool1dWithIndices<B>
One dimensional max pooling with indices. Read more
Source§fn max_pool1d_with_indices_backward(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: usize,
stride: usize,
padding: usize,
dilation: usize,
ceil_mode: bool,
output_grad: <B as Backend>::FloatTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
) -> MaxPool1dBackward<B>
fn max_pool1d_with_indices_backward( x: <B as Backend>::FloatTensorPrimitive, kernel_size: usize, stride: usize, padding: usize, dilation: usize, ceil_mode: bool, output_grad: <B as Backend>::FloatTensorPrimitive, indices: <B as Backend>::IntTensorPrimitive, ) -> MaxPool1dBackward<B>
Backward pass for the max pooling 1d operation.
Source§impl QTensorOps<MpsGraph> for MpsGraph
impl QTensorOps<MpsGraph> for MpsGraph
Source§fn q_from_data(
data: TensorData,
device: &Device<MpsGraph>,
) -> QuantizedTensor<MpsGraph>
fn q_from_data( data: TensorData, device: &Device<MpsGraph>, ) -> QuantizedTensor<MpsGraph>
Creates a new tensor from the data structure. Read more
Source§fn quantize(
tensor: FloatTensor<MpsGraph>,
scheme: &QuantScheme,
qparams: QuantizationParametersPrimitive<MpsGraph>,
) -> QuantizedTensor<MpsGraph>
fn quantize( tensor: FloatTensor<MpsGraph>, scheme: &QuantScheme, qparams: QuantizationParametersPrimitive<MpsGraph>, ) -> QuantizedTensor<MpsGraph>
Convert the tensor to a lower precision data type based on the quantization scheme and parameters.
Source§fn dequantize(tensor: QuantizedTensor<MpsGraph>) -> FloatTensor<MpsGraph>
fn dequantize(tensor: QuantizedTensor<MpsGraph>) -> FloatTensor<MpsGraph>
Convert the tensor back to a higher precision data type.
Source§fn q_device(t: &QuantizedTensor<MpsGraph>) -> Device<MpsGraph>
fn q_device(t: &QuantizedTensor<MpsGraph>) -> Device<MpsGraph>
Gets the device of the tensor. Read more
Source§fn q_to_device(
t: QuantizedTensor<MpsGraph>,
d: &Device<MpsGraph>,
) -> QuantizedTensor<MpsGraph>
fn q_to_device( t: QuantizedTensor<MpsGraph>, d: &Device<MpsGraph>, ) -> QuantizedTensor<MpsGraph>
Moves the tensor to the given device. Read more
Source§fn q_reshape(
t: QuantizedTensor<MpsGraph>,
shape: Shape,
) -> QuantizedTensor<MpsGraph>
fn q_reshape( t: QuantizedTensor<MpsGraph>, shape: Shape, ) -> QuantizedTensor<MpsGraph>
Reshapes a tensor. Read more
Source§fn q_into_data(
t: QuantizedTensor<MpsGraph>,
) -> impl Future<Output = Result<TensorData, ExecutionError>> + Send
fn q_into_data( t: QuantizedTensor<MpsGraph>, ) -> impl Future<Output = Result<TensorData, ExecutionError>> + Send
Converts the tensor to a data structure. Read more
Source§fn q_swap_dims(
t: QuantizedTensor<MpsGraph>,
d1: usize,
d2: usize,
) -> QuantizedTensor<MpsGraph>
fn q_swap_dims( t: QuantizedTensor<MpsGraph>, d1: usize, d2: usize, ) -> QuantizedTensor<MpsGraph>
Swaps two dimensions of a tensor. Read more
Source§fn q_permute(
t: QuantizedTensor<MpsGraph>,
axes: &[usize],
) -> QuantizedTensor<MpsGraph>
fn q_permute( t: QuantizedTensor<MpsGraph>, axes: &[usize], ) -> QuantizedTensor<MpsGraph>
Permutes the dimensions of a tensor. Read more
Source§fn q_flip(
t: QuantizedTensor<MpsGraph>,
axes: &[usize],
) -> QuantizedTensor<MpsGraph>
fn q_flip( t: QuantizedTensor<MpsGraph>, axes: &[usize], ) -> QuantizedTensor<MpsGraph>
Reverse the order of elements in a tensor along the given axes. Read more
Source§fn q_select(
t: QuantizedTensor<MpsGraph>,
dim: usize,
idx: IntTensor<MpsGraph>,
) -> QuantizedTensor<MpsGraph>
fn q_select( t: QuantizedTensor<MpsGraph>, dim: usize, idx: IntTensor<MpsGraph>, ) -> QuantizedTensor<MpsGraph>
Select tensor elements along the given dimension corresponding for the given indices. Read more
Source§fn q_slice(
t: QuantizedTensor<MpsGraph>,
slices: &[Slice],
) -> QuantizedTensor<MpsGraph>
fn q_slice( t: QuantizedTensor<MpsGraph>, slices: &[Slice], ) -> QuantizedTensor<MpsGraph>
Select tensor elements corresponding to the given slices. Read more
Source§fn q_expand(
t: QuantizedTensor<MpsGraph>,
shape: Shape,
) -> QuantizedTensor<MpsGraph>
fn q_expand( t: QuantizedTensor<MpsGraph>, shape: Shape, ) -> QuantizedTensor<MpsGraph>
Broadcasts the
tensor to the given shape.Source§fn quantize_dynamic(
tensor: <B as Backend>::FloatTensorPrimitive,
scheme: &QuantScheme,
) -> <B as Backend>::QuantizedTensorPrimitive
fn quantize_dynamic( tensor: <B as Backend>::FloatTensorPrimitive, scheme: &QuantScheme, ) -> <B as Backend>::QuantizedTensorPrimitive
Dynamically convert the tensor to a lower precision data type based on the quantization scheme.
Source§fn q_detach(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_detach( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Detaches a tensor from the computation graph.
Source§fn q_set_require_grad(
tensor: <B as Backend>::QuantizedTensorPrimitive,
_require_grad: bool,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_set_require_grad( tensor: <B as Backend>::QuantizedTensorPrimitive, _require_grad: bool, ) -> <B as Backend>::QuantizedTensorPrimitive
Sets the
require_grad flag of a tensor.Source§fn q_is_require_grad(_tensor: &<B as Backend>::QuantizedTensorPrimitive) -> bool
fn q_is_require_grad(_tensor: &<B as Backend>::QuantizedTensorPrimitive) -> bool
Returns the
require_grad flag of a tensor.Source§fn q_transpose(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_transpose( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Transposes a tensor. Read more
Source§fn q_gather(
dim: usize,
tensor: <B as Backend>::QuantizedTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_gather( dim: usize, tensor: <B as Backend>::QuantizedTensorPrimitive, indices: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Gather elements from a tensor. Read more
Source§fn q_repeat_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
times: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_repeat_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, times: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Repeat the tensor along the given dimension. Read more
Source§fn q_add(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_add( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Adds two tensors together. Read more
Source§fn q_add_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: Scalar,
) -> TensorPrimitive<B>
fn q_add_scalar( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: Scalar, ) -> TensorPrimitive<B>
Adds a scalar to a tensor. Read more
Source§fn q_clamp_min(
tensor: <B as Backend>::QuantizedTensorPrimitive,
min: Scalar,
) -> TensorPrimitive<B>
fn q_clamp_min( tensor: <B as Backend>::QuantizedTensorPrimitive, min: Scalar, ) -> TensorPrimitive<B>
Clamps a tensor under a minimum value. Read more
Source§fn q_clamp_max(
tensor: <B as Backend>::QuantizedTensorPrimitive,
max: Scalar,
) -> TensorPrimitive<B>
fn q_clamp_max( tensor: <B as Backend>::QuantizedTensorPrimitive, max: Scalar, ) -> TensorPrimitive<B>
Clamps a tensor over a maximum value. Read more
Source§fn q_clamp(
tensor: <B as Backend>::QuantizedTensorPrimitive,
min: Scalar,
max: Scalar,
) -> TensorPrimitive<B>
fn q_clamp( tensor: <B as Backend>::QuantizedTensorPrimitive, min: Scalar, max: Scalar, ) -> TensorPrimitive<B>
Clamps a tensor between a minimum and maximum value. Read more
Source§fn q_sub(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_sub( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Subtracts two tensors. Read more
Source§fn q_sub_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: Scalar,
) -> TensorPrimitive<B>
fn q_sub_scalar( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: Scalar, ) -> TensorPrimitive<B>
Subtracts a scalar from a tensor. Read more
Source§fn q_mul(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_mul( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Multiplies two tensors together element-wise.
Source§fn q_mul_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: Scalar,
) -> TensorPrimitive<B>
fn q_mul_scalar( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: Scalar, ) -> TensorPrimitive<B>
Multiplies a tensor by a scalar. Read more
Source§fn q_div(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_div( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Divides two tensors element-wise. Read more
Source§fn q_div_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: Scalar,
) -> TensorPrimitive<B>
fn q_div_scalar( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: Scalar, ) -> TensorPrimitive<B>
Divides a tensor by a scalar. Read more
Source§fn q_matmul(
lhs: TensorPrimitive<B>,
rhs: TensorPrimitive<B>,
) -> TensorPrimitive<B>
fn q_matmul( lhs: TensorPrimitive<B>, rhs: TensorPrimitive<B>, ) -> TensorPrimitive<B>
Multiplies two tensors together using matrix multiplication. Read more
Source§fn q_neg(tensor: <B as Backend>::QuantizedTensorPrimitive) -> TensorPrimitive<B>
fn q_neg(tensor: <B as Backend>::QuantizedTensorPrimitive) -> TensorPrimitive<B>
Negates a tensor element-wise.
Source§fn q_recip(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_recip( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Calculates the reciprocals element-wise
Source§fn q_sum(tensor: <B as Backend>::QuantizedTensorPrimitive) -> TensorPrimitive<B>
fn q_sum(tensor: <B as Backend>::QuantizedTensorPrimitive) -> TensorPrimitive<B>
Sum of all elements in a tensor. Read more
Source§fn q_sum_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> TensorPrimitive<B>
fn q_sum_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> TensorPrimitive<B>
Sum of all elements in a tensor along a dimension. Read more
Source§fn q_prod(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_prod( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Product of all elements in a tensor. Read more
Source§fn q_prod_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> TensorPrimitive<B>
fn q_prod_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> TensorPrimitive<B>
Product of all elements in a tensor along a dimension. Read more
Source§fn q_mean(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_mean( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Mean of all elements in a tensor. Read more
Source§fn q_mean_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> TensorPrimitive<B>
fn q_mean_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> TensorPrimitive<B>
Mean of all elements in a tensor along a dimension. Read more
Source§fn q_cumsum(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> TensorPrimitive<B>
fn q_cumsum( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> TensorPrimitive<B>
Computes the cumulative sum of elements along a dimension. Read more
Source§fn q_cumprod(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> TensorPrimitive<B>
fn q_cumprod( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> TensorPrimitive<B>
Computes the cumulative product of elements along a dimension. Read more
Source§fn q_cummin(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> TensorPrimitive<B>
fn q_cummin( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> TensorPrimitive<B>
Computes the cumulative minimum of elements along a dimension. Read more
Source§fn q_cummax(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> TensorPrimitive<B>
fn q_cummax( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> TensorPrimitive<B>
Computes the cumulative maximum of elements along a dimension. Read more
Source§fn q_exp(tensor: <B as Backend>::QuantizedTensorPrimitive) -> TensorPrimitive<B>
fn q_exp(tensor: <B as Backend>::QuantizedTensorPrimitive) -> TensorPrimitive<B>
Returns a new tensor with exponential values. Read more
Source§fn q_log(tensor: <B as Backend>::QuantizedTensorPrimitive) -> TensorPrimitive<B>
fn q_log(tensor: <B as Backend>::QuantizedTensorPrimitive) -> TensorPrimitive<B>
Returns a new tensor with natural logarithm values. Read more
Source§fn q_log1p(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_log1p( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Returns a new tensor with logarithm values of (1 + Xi). Read more
Source§fn q_powf(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_powf( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Element-wise power with another tensor. Read more
Source§fn q_powi(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> TensorPrimitive<B>
fn q_powi( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> TensorPrimitive<B>
Element-wise power with an IntTensor. Read more
Source§fn q_powi_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: Scalar,
) -> TensorPrimitive<B>
fn q_powi_scalar( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: Scalar, ) -> TensorPrimitive<B>
Element-wise power with an int scalar. Read more
Source§fn q_powf_scalar(
tensor: <B as Backend>::QuantizedTensorPrimitive,
value: Scalar,
) -> TensorPrimitive<B>
fn q_powf_scalar( tensor: <B as Backend>::QuantizedTensorPrimitive, value: Scalar, ) -> TensorPrimitive<B>
Element-wise power with a float scalar. Read more
Source§fn q_sqrt(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_sqrt( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Returns a new tensor with square root values. Read more
Source§fn q_abs(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_abs( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Returns a new tensor with absolute values. Read more
Source§fn q_cos(tensor: <B as Backend>::QuantizedTensorPrimitive) -> TensorPrimitive<B>
fn q_cos(tensor: <B as Backend>::QuantizedTensorPrimitive) -> TensorPrimitive<B>
Returns a new tensor with cosine values. Read more
Source§fn q_sin(tensor: <B as Backend>::QuantizedTensorPrimitive) -> TensorPrimitive<B>
fn q_sin(tensor: <B as Backend>::QuantizedTensorPrimitive) -> TensorPrimitive<B>
Returns a new tensor with sine values. Read more
Source§fn q_tan(tensor: <B as Backend>::QuantizedTensorPrimitive) -> TensorPrimitive<B>
fn q_tan(tensor: <B as Backend>::QuantizedTensorPrimitive) -> TensorPrimitive<B>
Returns a new tensor with tangent values. Read more
Source§fn q_cosh(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_cosh( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Returns a new tensor with hyperbolic cosine values. Read more
Source§fn q_sinh(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_sinh( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Returns a new tensor with hyperbolic sine values. Read more
Source§fn q_tanh(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> TensorPrimitive<B>
fn q_tanh( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> TensorPrimitive<B>
Returns a new tensor with hyperbolic tangent values. Read more
Source§fn q_erf(tensor: <B as Backend>::QuantizedTensorPrimitive) -> TensorPrimitive<B>
fn q_erf(tensor: <B as Backend>::QuantizedTensorPrimitive) -> TensorPrimitive<B>
Returns a new tensor with the error function values. Read more
Source§fn q_cat(
tensors: Vec<<B as Backend>::QuantizedTensorPrimitive>,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_cat( tensors: Vec<<B as Backend>::QuantizedTensorPrimitive>, dim: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Concatenates tensors along a dimension. Read more
Source§fn q_argmax(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn q_argmax( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Gets the indices of the maximum elements of a tensor along an axis. Read more
Source§fn q_argmin(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn q_argmin( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Gets the indices of the minimum elements of a tensor along an axis. Read more
Source§fn q_max(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_max( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Gets the maximum element of a tensor. Read more
Source§fn q_max_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_max_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Gets the maximum elements of a tensor along an axis. Read more
Source§fn q_max_dim_with_indices(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> (<B as Backend>::QuantizedTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn q_max_dim_with_indices( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> (<B as Backend>::QuantizedTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Gets the maximum elements of a tensor along an axis and their indices. Read more
Source§fn q_min(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_min( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Gets the minimum element of a tensor. Read more
Source§fn q_min_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_min_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Gets the minimum elements of a tensor along an axis. Read more
Source§fn q_min_dim_with_indices(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> (<B as Backend>::QuantizedTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn q_min_dim_with_indices( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> (<B as Backend>::QuantizedTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Gets the minimum elements of a tensor along an axis and their indices. Read more
Source§fn q_max_abs(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_max_abs( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Gets the maximum element of a tensor. Read more
Source§fn q_max_abs_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_max_abs_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Gets the maximum elements of a tensor along an axis. Read more
Source§fn q_any(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn q_any( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Tests if any element in the
tensor evaluates to True. Read moreSource§fn q_any_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn q_any_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
Source§fn q_all(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn q_all( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Tests if all elements in the
tensor evaluate to True. Read moreSource§fn q_all_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn q_all_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
Source§fn q_sort(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
descending: bool,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_sort( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, descending: bool, ) -> <B as Backend>::QuantizedTensorPrimitive
Sort the elements of the input
tensor by value in along a given dimension. Read moreSource§fn q_sort_with_indices(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
descending: bool,
) -> (<B as Backend>::QuantizedTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn q_sort_with_indices( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, descending: bool, ) -> (<B as Backend>::QuantizedTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Sort the elements of the input
tensor by value in along a given dimension. Read moreSource§fn q_argsort(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
descending: bool,
) -> <B as Backend>::IntTensorPrimitive
fn q_argsort( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, descending: bool, ) -> <B as Backend>::IntTensorPrimitive
Returns the indices that sort the elements of the input
tensor by value along a given dimension. Read moreSource§impl TransactionOps<MpsGraph> for MpsGraph
impl TransactionOps<MpsGraph> for MpsGraph
Source§fn tr_execute(
transaction: TransactionPrimitive<B>,
) -> impl Future<Output = Result<TransactionPrimitiveData, ExecutionError>> + Send
fn tr_execute( transaction: TransactionPrimitive<B>, ) -> impl Future<Output = Result<TransactionPrimitiveData, ExecutionError>> + Send
Executes a transaction and return its
data.
impl Copy for MpsGraph
Auto Trait Implementations§
impl Freeze for MpsGraph
impl RefUnwindSafe for MpsGraph
impl Send for MpsGraph
impl Sync for MpsGraph
impl Unpin for MpsGraph
impl UnsafeUnpin for MpsGraph
impl UnwindSafe for MpsGraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more