Trait FloatTensorOps
pub trait FloatTensorOps<B>where
B: Backend,{
Show 113 methods
// Required methods
fn float_from_data(
data: TensorData,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_random(
shape: Shape,
distribution: Distribution,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_into_data(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> impl Future<Output = TensorData> + Send;
fn float_device(
tensor: &<B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::Device;
fn float_to_device(
tensor: <B as Backend>::FloatTensorPrimitive,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_into_int(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive;
fn float_empty(
shape: Shape,
device: &<B as Backend>::Device,
dtype: FloatDType,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_add(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_add_scalar(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_sub(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_sub_scalar(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_mul(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_mul_scalar(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_div(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_div_scalar(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_remainder(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_remainder_scalar(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_matmul(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_cross(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_recip(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_swap_dims(
tensor: <B as Backend>::FloatTensorPrimitive,
dim1: usize,
dim2: usize,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_permute(
tensor: <B as Backend>::FloatTensorPrimitive,
axes: &[usize],
) -> <B as Backend>::FloatTensorPrimitive;
fn float_flip(
tensor: <B as Backend>::FloatTensorPrimitive,
axes: &[usize],
) -> <B as Backend>::FloatTensorPrimitive;
fn float_reshape(
tensor: <B as Backend>::FloatTensorPrimitive,
shape: Shape,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_gather(
dim: usize,
tensor: <B as Backend>::FloatTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_scatter(
dim: usize,
tensor: <B as Backend>::FloatTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
value: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_select(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_select_assign(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive,
value: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_slice(
tensor: <B as Backend>::FloatTensorPrimitive,
slices: &[Slice],
) -> <B as Backend>::FloatTensorPrimitive;
fn float_slice_assign(
tensor: <B as Backend>::FloatTensorPrimitive,
slices: &[Slice],
value: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_mask_where(
tensor: <B as Backend>::FloatTensorPrimitive,
mask: <B as Backend>::BoolTensorPrimitive,
value: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_mask_fill(
tensor: <B as Backend>::FloatTensorPrimitive,
mask: <B as Backend>::BoolTensorPrimitive,
value: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_equal(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive;
fn float_equal_elem(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive;
fn float_greater(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive;
fn float_greater_elem(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive;
fn float_greater_equal(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive;
fn float_greater_equal_elem(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive;
fn float_lower(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive;
fn float_lower_elem(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive;
fn float_lower_equal(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive;
fn float_lower_equal_elem(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive;
fn float_sum(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_sum_dim(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_mean_dim(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_cumsum(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_cumprod(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_cummin(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_cummax(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_cast(
tensor: <B as Backend>::FloatTensorPrimitive,
dtype: FloatDType,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_exp(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_log(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_log1p(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_powf(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_powf_scalar_impl(
tensor: <B as Backend>::FloatTensorPrimitive,
value: f32,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_sqrt(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_abs(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_cos(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_sin(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_round(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_floor(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_ceil(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_trunc(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_erf(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_argmax(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive;
fn float_argmin(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive;
fn float_expand(
tensor: <B as Backend>::FloatTensorPrimitive,
shape: Shape,
) -> <B as Backend>::FloatTensorPrimitive;
fn float_unfold(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
size: usize,
step: usize,
) -> <B as Backend>::FloatTensorPrimitive;
// Provided methods
fn float_zeros(
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 { ... }
fn float_full(
shape: Shape,
fill_value: <B as Backend>::FloatElem,
device: &<B as Backend>::Device,
dtype: FloatDType,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_repeat_dim(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
times: usize,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_clamp_min(
tensor: <B as Backend>::FloatTensorPrimitive,
min: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_clamp_max(
tensor: <B as Backend>::FloatTensorPrimitive,
max: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_clamp(
tensor: <B as Backend>::FloatTensorPrimitive,
min: <B as Backend>::FloatElem,
max: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_neg(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_transpose(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_not_equal(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive { ... }
fn float_not_equal_elem(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive { ... }
fn float_detach(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_set_require_grad(
tensor: <B as Backend>::FloatTensorPrimitive,
_require_grad: bool,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_is_require_grad(
_tensor: &<B as Backend>::FloatTensorPrimitive,
) -> bool { ... }
fn float_prod(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_prod_dim(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_mean(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_powi(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_powi_scalar(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_powi_scalar_impl(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_powf_scalar(
tensor: <B as Backend>::FloatTensorPrimitive,
value: f32,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_tan(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_cosh(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_sinh(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_tanh(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_cat(
tensors: Vec<<B as Backend>::FloatTensorPrimitive>,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_max(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_max_dim(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_max_dim_with_indices(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> (<B as Backend>::FloatTensorPrimitive, <B as Backend>::IntTensorPrimitive) { ... }
fn float_min(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_min_dim(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_min_dim_with_indices(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> (<B as Backend>::FloatTensorPrimitive, <B as Backend>::IntTensorPrimitive) { ... }
fn float_max_abs(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_max_abs_dim(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_any(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive { ... }
fn float_any_dim(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive { ... }
fn float_all(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive { ... }
fn float_all_dim(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive { ... }
fn float_sign(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_sort(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
descending: bool,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_sort_with_indices(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
descending: bool,
) -> (<B as Backend>::FloatTensorPrimitive, <B as Backend>::IntTensorPrimitive) { ... }
fn float_argsort(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
descending: bool,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn float_grid_sample_2d(
tensor: <B as Backend>::FloatTensorPrimitive,
grid: <B as Backend>::FloatTensorPrimitive,
method: InterpolateMode,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_is_nan(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive { ... }
fn float_is_inf(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive { ... }
}Expand description
Operations on float tensors.
Required Methods§
fn float_from_data(
data: TensorData,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive
fn float_from_data( data: TensorData, device: &<B as Backend>::Device, ) -> <B as Backend>::FloatTensorPrimitive
fn float_random(
shape: Shape,
distribution: Distribution,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive
fn float_random( shape: Shape, distribution: Distribution, device: &<B as Backend>::Device, ) -> <B as Backend>::FloatTensorPrimitive
fn float_into_data(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> impl Future<Output = TensorData> + Send
fn float_into_data( tensor: <B as Backend>::FloatTensorPrimitive, ) -> impl Future<Output = TensorData> + Send
fn float_device(
tensor: &<B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::Device
fn float_device( tensor: &<B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::Device
fn float_to_device(
tensor: <B as Backend>::FloatTensorPrimitive,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive
fn float_to_device( tensor: <B as Backend>::FloatTensorPrimitive, device: &<B as Backend>::Device, ) -> <B as Backend>::FloatTensorPrimitive
fn float_into_int(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn float_into_int( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
fn float_empty(
shape: Shape,
device: &<B as Backend>::Device,
dtype: FloatDType,
) -> <B as Backend>::FloatTensorPrimitive
fn float_empty( shape: Shape, device: &<B as Backend>::Device, dtype: FloatDType, ) -> <B as Backend>::FloatTensorPrimitive
fn float_add(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_add( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_add_scalar(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive
fn float_add_scalar( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive
fn float_sub(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_sub( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_sub_scalar(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive
fn float_sub_scalar( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive
fn float_mul(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_mul( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Multiplies two tensors together element-wise.
fn float_mul_scalar(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive
fn float_mul_scalar( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive
fn float_div(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_div( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_div_scalar(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive
fn float_div_scalar( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive
fn float_remainder(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_remainder( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_remainder_scalar(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive
fn float_remainder_scalar( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive
fn float_matmul(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_matmul( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_cross(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive
fn float_cross( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatTensorPrimitive, dim: usize, ) -> <B as Backend>::FloatTensorPrimitive
fn float_recip(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_recip( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Calculates the reciprocals element-wise
fn float_swap_dims(
tensor: <B as Backend>::FloatTensorPrimitive,
dim1: usize,
dim2: usize,
) -> <B as Backend>::FloatTensorPrimitive
fn float_swap_dims( tensor: <B as Backend>::FloatTensorPrimitive, dim1: usize, dim2: usize, ) -> <B as Backend>::FloatTensorPrimitive
fn float_permute(
tensor: <B as Backend>::FloatTensorPrimitive,
axes: &[usize],
) -> <B as Backend>::FloatTensorPrimitive
fn float_permute( tensor: <B as Backend>::FloatTensorPrimitive, axes: &[usize], ) -> <B as Backend>::FloatTensorPrimitive
fn float_flip(
tensor: <B as Backend>::FloatTensorPrimitive,
axes: &[usize],
) -> <B as Backend>::FloatTensorPrimitive
fn float_flip( tensor: <B as Backend>::FloatTensorPrimitive, axes: &[usize], ) -> <B as Backend>::FloatTensorPrimitive
Reverse the order of elements in a tensor along the given axes.
§Arguments
tensor- The tensor to reverse.axes- The axes to reverse.
The tensor with the elements reversed.
fn float_reshape(
tensor: <B as Backend>::FloatTensorPrimitive,
shape: Shape,
) -> <B as Backend>::FloatTensorPrimitive
fn float_reshape( tensor: <B as Backend>::FloatTensorPrimitive, shape: Shape, ) -> <B as Backend>::FloatTensorPrimitive
fn float_gather(
dim: usize,
tensor: <B as Backend>::FloatTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_gather( dim: usize, tensor: <B as Backend>::FloatTensorPrimitive, indices: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_scatter(
dim: usize,
tensor: <B as Backend>::FloatTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
value: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_scatter( dim: usize, tensor: <B as Backend>::FloatTensorPrimitive, indices: <B as Backend>::IntTensorPrimitive, value: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_select(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_select( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, indices: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_select_assign(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive,
value: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_select_assign( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, indices: <B as Backend>::IntTensorPrimitive, value: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Assign the selected elements along the given dimension corresponding for the given indices to the given value.
§Arguments
tensor- The tensor to select from.dim- The dimension to select from.indices- The indices to select.value- The value to assign.
§Returns
The tensor with the selected elements assigned to the given value.
fn float_slice(
tensor: <B as Backend>::FloatTensorPrimitive,
slices: &[Slice],
) -> <B as Backend>::FloatTensorPrimitive
fn float_slice( tensor: <B as Backend>::FloatTensorPrimitive, slices: &[Slice], ) -> <B as Backend>::FloatTensorPrimitive
fn float_slice_assign(
tensor: <B as Backend>::FloatTensorPrimitive,
slices: &[Slice],
value: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_slice_assign( tensor: <B as Backend>::FloatTensorPrimitive, slices: &[Slice], value: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_mask_where(
tensor: <B as Backend>::FloatTensorPrimitive,
mask: <B as Backend>::BoolTensorPrimitive,
value: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_mask_where( tensor: <B as Backend>::FloatTensorPrimitive, mask: <B as Backend>::BoolTensorPrimitive, value: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Update the given tensor with the value tensor where the mask is true.
§Arguments
tensor- The tensor to select from.mask- The boolean mask to select with.value- The value to assign to the selected elements from the value tensor.
§Returns
The tensor with the selected elements assigned to the given value.
fn float_mask_fill(
tensor: <B as Backend>::FloatTensorPrimitive,
mask: <B as Backend>::BoolTensorPrimitive,
value: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive
fn float_mask_fill( tensor: <B as Backend>::FloatTensorPrimitive, mask: <B as Backend>::BoolTensorPrimitive, value: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive
fn float_equal(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn float_equal( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
fn float_equal_elem(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive
fn float_equal_elem( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::BoolTensorPrimitive
fn float_greater(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn float_greater( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
fn float_greater_elem(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive
fn float_greater_elem( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::BoolTensorPrimitive
fn float_greater_equal(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn float_greater_equal( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
fn float_greater_equal_elem(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive
fn float_greater_equal_elem( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::BoolTensorPrimitive
fn float_lower(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn float_lower( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
fn float_lower_elem(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive
fn float_lower_elem( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::BoolTensorPrimitive
fn float_lower_equal(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn float_lower_equal( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
fn float_lower_equal_elem(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive
fn float_lower_equal_elem( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::BoolTensorPrimitive
fn float_sum(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_sum( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_sum_dim(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive
fn float_sum_dim( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, ) -> <B as Backend>::FloatTensorPrimitive
fn float_mean_dim(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive
fn float_mean_dim( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, ) -> <B as Backend>::FloatTensorPrimitive
fn float_cumsum(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive
fn float_cumsum( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, ) -> <B as Backend>::FloatTensorPrimitive
Computes the cumulative sum of elements along a dimension.
§Arguments
tensor- The tensor to compute the cumulative sum of.dim- The dimension along which to compute the cumulative sum.
§Returns
A tensor with the same shape where each element is the cumulative sum of all elements up to and including that position along the dimension.
fn float_cumprod(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive
fn float_cumprod( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, ) -> <B as Backend>::FloatTensorPrimitive
Computes the cumulative product of elements along a dimension.
§Arguments
tensor- The tensor to compute the cumulative product of.dim- The dimension along which to compute the cumulative product.
§Returns
A tensor with the same shape where each element is the cumulative product of all elements up to and including that position along the dimension.
fn float_cummin(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive
fn float_cummin( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, ) -> <B as Backend>::FloatTensorPrimitive
Computes the cumulative minimum of elements along a dimension.
§Arguments
tensor- The tensor to compute the cumulative minimum of.dim- The dimension along which to compute the cumulative minimum.
§Returns
A tensor with the same shape where each element is the minimum of all elements up to and including that position along the dimension.
fn float_cummax(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive
fn float_cummax( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, ) -> <B as Backend>::FloatTensorPrimitive
Computes the cumulative maximum of elements along a dimension.
§Arguments
tensor- The tensor to compute the cumulative maximum of.dim- The dimension along which to compute the cumulative maximum.
§Returns
A tensor with the same shape where each element is the maximum of all elements up to and including that position along the dimension.
fn float_cast(
tensor: <B as Backend>::FloatTensorPrimitive,
dtype: FloatDType,
) -> <B as Backend>::FloatTensorPrimitive
fn float_cast( tensor: <B as Backend>::FloatTensorPrimitive, dtype: FloatDType, ) -> <B as Backend>::FloatTensorPrimitive
fn float_exp(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_exp( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_log(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_log( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_log1p(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_log1p( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_powf(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_powf( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_powf_scalar_impl(
tensor: <B as Backend>::FloatTensorPrimitive,
value: f32,
) -> <B as Backend>::FloatTensorPrimitive
fn float_powf_scalar_impl( tensor: <B as Backend>::FloatTensorPrimitive, value: f32, ) -> <B as Backend>::FloatTensorPrimitive
Returns a new tensor with values raised to the power of float value.
§Backend Implementors Note
This is the generic implementation of integer exponentiation
called by Self::float_powf_scalar in the fallback case.
This is the minimal required support a Backend must implement
for exponentiation.
As a general rule, this should not be called directly.
§Arguments
tensor- The tensor to exponentiate.value- The exponent.
§Returns
A tensor with the same shape as tensor with values raised to the power of value.
fn float_sqrt(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_sqrt( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_abs(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_abs( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_cos(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_cos( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_sin(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_sin( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_round(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_round( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Returns a new tensor with rounded values.
This function should implement the round half to even strategy, with halfway cases rounded to the nearest even integer value.
§Arguments
tensor- The tensor to be rounded.
§Returns
A tensor with the same shape as tensor with rounded values.
fn float_floor(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_floor( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_ceil(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_ceil( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_trunc(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_trunc( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_erf(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_erf( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_argmax(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn float_argmax( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
fn float_argmin(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn float_argmin( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
fn float_expand(
tensor: <B as Backend>::FloatTensorPrimitive,
shape: Shape,
) -> <B as Backend>::FloatTensorPrimitive
fn float_expand( tensor: <B as Backend>::FloatTensorPrimitive, shape: Shape, ) -> <B as Backend>::FloatTensorPrimitive
Broadcasts the float tensor to the given shape.
fn float_unfold(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
size: usize,
step: usize,
) -> <B as Backend>::FloatTensorPrimitive
fn float_unfold( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, size: usize, step: usize, ) -> <B as Backend>::FloatTensorPrimitive
Unfold windows along a dimension.
Returns a view of the tensor with all complete windows of size size in dimension dim;
where windows are advanced by step at each index.
The number of windows is max(0, (shape[dim] - size).ceil_div(step)).
§Arguments
tensor- The input tensor to unfold; of shape[pre=..., dim shape, post=...]dim- the selected dim.size- the size of each unfolded window.step- the step between each window.
§Returns
A tensor view with shape [pre=..., windows, size, post=...].
Provided Methods§
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
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
fn float_full(
shape: Shape,
fill_value: <B as Backend>::FloatElem,
device: &<B as Backend>::Device,
dtype: FloatDType,
) -> <B as Backend>::FloatTensorPrimitive
fn float_full( shape: Shape, fill_value: <B as Backend>::FloatElem, device: &<B as Backend>::Device, dtype: FloatDType, ) -> <B as Backend>::FloatTensorPrimitive
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
fn float_clamp_min(
tensor: <B as Backend>::FloatTensorPrimitive,
min: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive
fn float_clamp_min( tensor: <B as Backend>::FloatTensorPrimitive, min: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive
fn float_clamp_max(
tensor: <B as Backend>::FloatTensorPrimitive,
max: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive
fn float_clamp_max( tensor: <B as Backend>::FloatTensorPrimitive, max: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive
fn float_clamp(
tensor: <B as Backend>::FloatTensorPrimitive,
min: <B as Backend>::FloatElem,
max: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive
fn float_clamp( tensor: <B as Backend>::FloatTensorPrimitive, min: <B as Backend>::FloatElem, max: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive
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.
fn float_transpose(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_transpose( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
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
fn float_not_equal_elem(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive
fn float_not_equal_elem( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::BoolTensorPrimitive
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.
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.
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.
fn float_prod(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_prod( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_prod_dim(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive
fn float_prod_dim( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, ) -> <B as Backend>::FloatTensorPrimitive
fn float_mean(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_mean( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
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
fn float_powi_scalar(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::FloatTensorPrimitive
fn float_powi_scalar( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::FloatTensorPrimitive
Raises a tensor to the power of an int scalar.
§Backend Implementors Note
A number of common exponent cases can be implemented with operations which are much cheaper than generic exponentiation.
This (Backend impl overridable) operation handles generic optimizations
for several common integer exponent cases; and then dispatches to
the (Backend impl overridable) Self::float_powi_scalar_impl
operation to handle the generic case.
§Arguments
lhs- The left-hand side tensor.rhs- The right-hand side scalar.
§Returns
The elements of lhs raised to the value of rhs.
fn float_powi_scalar_impl(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::FloatTensorPrimitive
fn float_powi_scalar_impl( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::FloatTensorPrimitive
Raises a tensor to the power of an int scalar.
§Backend Implementors Note
This is the generic implementation of integer exponentiation
called by Self::float_powi_scalar in the fallback case.
As a general rule, this should not be called directly.
§Arguments
lhs- The left-hand side tensor.rhs- The right-hand side scalar.
§Returns
The elements of lhs raised to the value of rhs.
fn float_powf_scalar(
tensor: <B as Backend>::FloatTensorPrimitive,
value: f32,
) -> <B as Backend>::FloatTensorPrimitive
fn float_powf_scalar( tensor: <B as Backend>::FloatTensorPrimitive, value: f32, ) -> <B as Backend>::FloatTensorPrimitive
Returns a new tensor with values raised to the power of float value.
§Backend Implementors Note
This (Backend impl overridable) operation dispatches integer exponentiation
to Self::float_powi_scalar, and the remaining non-integer exponent cases to
the (Backend impl overridable) Self::float_powf_scalar_impl
operation to handle the generic case.
§Arguments
tensor- The tensor to exponentiate.value- The exponent.
§Returns
A tensor with the same shape as tensor with values raised to the power of value.
fn float_tan(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_tan( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_cosh(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_cosh( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_sinh(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_sinh( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_tanh(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_tanh( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_cat(
tensors: Vec<<B as Backend>::FloatTensorPrimitive>,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive
fn float_cat( tensors: Vec<<B as Backend>::FloatTensorPrimitive>, dim: usize, ) -> <B as Backend>::FloatTensorPrimitive
fn float_max(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_max( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_max_dim(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive
fn float_max_dim( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, ) -> <B as Backend>::FloatTensorPrimitive
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)
fn float_min(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_min( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_min_dim(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive
fn float_min_dim( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, ) -> <B as Backend>::FloatTensorPrimitive
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)
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
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
fn float_any(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn float_any( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
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
Tests if any element in the float tensor evaluates to True along a given dimension dim.
§Arguments
tensor- The tensor to test.dim- The axis along which to test.
§Returns
A boolean tensor Tensor<B, D, Bool> with the same size as input tensor, except in the dim axis
where the size is 1. The elem in the dim axis is True if any element along this dim in the
input evaluates to True, False otherwise.
fn float_all(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn float_all( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
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
Tests if all elements in the float tensor evaluate to True along a given dimension dim.
§Arguments
tensor- The tensor to test.dim- The axis along which to test.
§Returns
A boolean tensor Tensor<B, D, Bool> with the same size as input tensor, except in the dim axis
where the size is 1. The elem in the dim axis is True if all elements along this dim in the input
evaluates to True, False otherwise.
fn float_sign(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_sign( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn float_sort(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
descending: bool,
) -> <B as Backend>::FloatTensorPrimitive
fn float_sort( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, descending: bool, ) -> <B as Backend>::FloatTensorPrimitive
Sort the elements of the input tensor by value in along a given dimension.
This sort is unstable (i.e., may reorder equal elements).
§Arguments
tensor- The input tensor.dim- The axis along which to sort.descending- The sorting order.
§Returns
A tensor with the same shape as the input tensor, where the elements are sorted by value.
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.
This sort is unstable (i.e., may reorder equal elements).
§Arguments
tensor- The input tensor.dim- The axis along which to sort.descending- The sorting order.
§Returns
A tensor with the same shape as the input tensor and corresponding indices, where the elements are sorted by value and the indices map back to the original input tensor.
fn float_argsort(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
descending: bool,
) -> <B as Backend>::IntTensorPrimitive
fn float_argsort( tensor: <B as Backend>::FloatTensorPrimitive, 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.
This sort is unstable (i.e., may reorder equal elements).
§Arguments
tensor- The input tensor.dim- The axis along which to sort.descending- The sorting order.
§Returns
A tensor with the same shape as the input tensor the indices map back to the original input tensor.
fn float_grid_sample_2d(
tensor: <B as Backend>::FloatTensorPrimitive,
grid: <B as Backend>::FloatTensorPrimitive,
method: InterpolateMode,
) -> <B as Backend>::FloatTensorPrimitive
fn float_grid_sample_2d( tensor: <B as Backend>::FloatTensorPrimitive, grid: <B as Backend>::FloatTensorPrimitive, method: InterpolateMode, ) -> <B as Backend>::FloatTensorPrimitive
Samples tensor as a two-dimensional spatial grid of (possibly multi-channel) values, using the given locations in [-1, 1].
Interpolation is bilinear. Padding is border: out of bounds locations will be clamped to the nearest border
tensor- The tensor being sampled from, shape (N, C, H_in, W_in)grid- A tensor of locations, with shape (N, H_out, W_out, 2). Values are [-1, 1]. A [x = -1, y = -1] means top-left, and [x = 1, y = 1] means bottom-rightmethod- How to interpolate between samples
§Returns
A tensor with shape (N, C, H_out, W_out)
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.
§Returns
A boolean tensor where true indicates NaN and false indicates a non-NaN value.
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).
§Returns
A boolean tensor where true indicates that the value is infinite
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.