Trait burn::tensor::ops::FloatTensorOps
pub trait FloatTensorOps<B>where
B: Backend,{
Show 99 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_shape(tensor: &<B as Backend>::FloatTensorPrimitive) -> Shape;
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,
) -> <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_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_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,
ranges: &[Range<usize>],
) -> <B as Backend>::FloatTensorPrimitive;
fn float_slice_assign(
tensor: <B as Backend>::FloatTensorPrimitive,
ranges: &[Range<usize>],
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_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(
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_tanh(
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_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;
// Provided methods
fn float_zeros(
shape: Shape,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_ones(
shape: Shape,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_full(
shape: Shape,
fill_value: <B as Backend>::FloatElem,
device: &<B as Backend>::Device,
) -> <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_into_full_precision(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <<<B as Backend>::FullPrecisionBridge as BackendBridge<B>>::Target as Backend>::FloatTensorPrimitive { ... }
fn float_from_full_precision(
tensor: <<<B as Backend>::FullPrecisionBridge as BackendBridge<B>>::Target 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_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_narrow(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
start: usize,
length: usize,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn float_chunk(
tensor: <B as Backend>::FloatTensorPrimitive,
chunks: usize,
dim: usize,
) -> Vec<<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 { ... }
}
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_shape(tensor: &<B as Backend>::FloatTensorPrimitive) -> Shape
fn float_shape(tensor: &<B as Backend>::FloatTensorPrimitive) -> Shape
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,
) -> <B as Backend>::FloatTensorPrimitive
fn float_empty( shape: Shape, device: &<B as Backend>::Device, ) -> <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_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_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,
ranges: &[Range<usize>],
) -> <B as Backend>::FloatTensorPrimitive
fn float_slice( tensor: <B as Backend>::FloatTensorPrimitive, ranges: &[Range<usize>], ) -> <B as Backend>::FloatTensorPrimitive
fn float_slice_assign(
tensor: <B as Backend>::FloatTensorPrimitive,
ranges: &[Range<usize>],
value: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_slice_assign( tensor: <B as Backend>::FloatTensorPrimitive, ranges: &[Range<usize>], 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_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(
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
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_tanh(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_tanh( 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_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
.
Provided Methods§
fn float_zeros(
shape: Shape,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive
fn float_zeros( shape: Shape, device: &<B as Backend>::Device, ) -> <B as Backend>::FloatTensorPrimitive
fn float_ones(
shape: Shape,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive
fn float_ones( shape: Shape, device: &<B as Backend>::Device, ) -> <B as Backend>::FloatTensorPrimitive
fn float_full(
shape: Shape,
fill_value: <B as Backend>::FloatElem,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive
fn float_full( shape: Shape, fill_value: <B as Backend>::FloatElem, device: &<B as Backend>::Device, ) -> <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_into_full_precision(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <<<B as Backend>::FullPrecisionBridge as BackendBridge<B>>::Target as Backend>::FloatTensorPrimitive
fn float_into_full_precision( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <<<B as Backend>::FullPrecisionBridge as BackendBridge<B>>::Target as Backend>::FloatTensorPrimitive
fn float_from_full_precision(
tensor: <<<B as Backend>::FullPrecisionBridge as BackendBridge<B>>::Target as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_from_full_precision( tensor: <<<B as Backend>::FullPrecisionBridge as BackendBridge<B>>::Target 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
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_narrow(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
start: usize,
length: usize,
) -> <B as Backend>::FloatTensorPrimitive
fn float_narrow( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, start: usize, length: usize, ) -> <B as Backend>::FloatTensorPrimitive
Returns a new tensor with the given dimension narrowed to the given range.
§Arguments
dim
- The dimension along which the tensor will be narrowed.start
- The starting point of the given range.length
- The ending point of the given range.
§Panics
- If the dimension is greater than the number of dimensions of the tensor.
- If the given range exceeds the number of elements on the given dimension.
§Returns
A new tensor with the given dimension narrowed to the given range.
fn float_chunk(
tensor: <B as Backend>::FloatTensorPrimitive,
chunks: usize,
dim: usize,
) -> Vec<<B as Backend>::FloatTensorPrimitive>
fn float_chunk( tensor: <B as Backend>::FloatTensorPrimitive, chunks: usize, dim: usize, ) -> Vec<<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.