Trait burn::tensor::ops::FloatTensorOps
pub trait FloatTensorOps<B>where
B: Backend,{
Show 96 methods
// Required methods
fn float_from_data<const D: usize>(
data: TensorData,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_random<const D: usize>(
shape: Shape<D>,
distribution: Distribution,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_shape<const D: usize>(
tensor: &<B as Backend>::FloatTensorPrimitive<D>,
) -> Shape<D>;
fn float_into_data<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> impl Future<Output = TensorData> + Send;
fn float_device<const D: usize>(
tensor: &<B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::Device;
fn float_to_device<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_into_int<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn float_empty<const D: usize>(
shape: Shape<D>,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_add<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_add_scalar<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_sub<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_sub_scalar<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_mul<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_mul_scalar<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_div<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_div_scalar<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_remainder_scalar<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_matmul<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_recip<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_swap_dims<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim1: usize,
dim2: usize,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_permute<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
axes: [usize; D],
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_flip<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
axes: &[usize],
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_reshape<const D1: usize, const D2: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D1>,
shape: Shape<D2>,
) -> <B as Backend>::FloatTensorPrimitive<D2>;
fn float_gather<const D: usize>(
dim: usize,
tensor: <B as Backend>::FloatTensorPrimitive<D>,
indices: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_scatter<const D: usize>(
dim: usize,
tensor: <B as Backend>::FloatTensorPrimitive<D>,
indices: <B as Backend>::IntTensorPrimitive<D>,
value: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_select<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive<1>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_select_assign<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive<1>,
value: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_slice<const D1: usize, const D2: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D1>,
ranges: [Range<usize>; D2],
) -> <B as Backend>::FloatTensorPrimitive<D1>;
fn float_slice_assign<const D1: usize, const D2: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D1>,
ranges: [Range<usize>; D2],
value: <B as Backend>::FloatTensorPrimitive<D1>,
) -> <B as Backend>::FloatTensorPrimitive<D1>;
fn float_mask_where<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
mask: <B as Backend>::BoolTensorPrimitive<D>,
value: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_mask_fill<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
mask: <B as Backend>::BoolTensorPrimitive<D>,
value: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_equal<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>;
fn float_equal_elem<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive<D>;
fn float_greater<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>;
fn float_greater_elem<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive<D>;
fn float_greater_equal<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>;
fn float_greater_equal_elem<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive<D>;
fn float_lower<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>;
fn float_lower_elem<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive<D>;
fn float_lower_equal<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>;
fn float_lower_equal_elem<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive<D>;
fn float_sum<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<1>;
fn float_sum_dim<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_mean_dim<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_exp<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_log<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_log1p<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_powf<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_powf_scalar<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
value: f32,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_sqrt<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_abs<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_cos<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_sin<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_tanh<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_erf<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn float_argmax<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn float_argmin<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn float_expand<const D1: usize, const D2: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D1>,
shape: Shape<D2>,
) -> <B as Backend>::FloatTensorPrimitive<D2>;
// Provided methods
fn float_zeros<const D: usize>(
shape: Shape<D>,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive<D> { ... }
fn float_ones<const D: usize>(
shape: Shape<D>,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive<D> { ... }
fn float_full<const D: usize>(
shape: Shape<D>,
fill_value: <B as Backend>::FloatElem,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive<D> { ... }
fn float_repeat_dim<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
times: usize,
) -> <B as Backend>::FloatTensorPrimitive<D> { ... }
fn float_clamp_min<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
min: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive<D> { ... }
fn float_clamp_max<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
max: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive<D> { ... }
fn float_clamp<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
min: <B as Backend>::FloatElem,
max: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive<D> { ... }
fn float_neg<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D> { ... }
fn float_transpose<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D> { ... }
fn float_not_equal<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D> { ... }
fn float_not_equal_elem<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive<D> { ... }
fn float_detach<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D> { ... }
fn float_set_require_grad<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
_require_grad: bool,
) -> <B as Backend>::FloatTensorPrimitive<D> { ... }
fn float_is_require_grad<const D: usize>(
_tensor: &<B as Backend>::FloatTensorPrimitive<D>,
) -> bool { ... }
fn float_prod<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<1> { ... }
fn float_prod_dim<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive<D> { ... }
fn float_mean<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<1> { ... }
fn float_into_full_precision<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <<<B as Backend>::FullPrecisionBridge as BackendBridge<B>>::Target as Backend>::FloatTensorPrimitive<D> { ... }
fn float_from_full_precision<const D: usize>(
tensor: <<<B as Backend>::FullPrecisionBridge as BackendBridge<B>>::Target as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D> { ... }
fn float_powi<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D> { ... }
fn float_powi_scalar<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::FloatTensorPrimitive<D> { ... }
fn float_cat<const D: usize>(
tensors: Vec<<B as Backend>::FloatTensorPrimitive<D>>,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive<D> { ... }
fn float_max<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<1> { ... }
fn float_max_dim<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive<D> { ... }
fn float_max_dim_with_indices<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> (<B as Backend>::FloatTensorPrimitive<D>, <B as Backend>::IntTensorPrimitive<D>) { ... }
fn float_min<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<1> { ... }
fn float_min_dim<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive<D> { ... }
fn float_min_dim_with_indices<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> (<B as Backend>::FloatTensorPrimitive<D>, <B as Backend>::IntTensorPrimitive<D>) { ... }
fn float_narrow<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
start: usize,
length: usize,
) -> <B as Backend>::FloatTensorPrimitive<D> { ... }
fn float_chunk<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
chunks: usize,
dim: usize,
) -> Vec<<B as Backend>::FloatTensorPrimitive<D>> { ... }
fn float_any<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<1> { ... }
fn float_any_dim<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive<D> { ... }
fn float_all<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<1> { ... }
fn float_all_dim<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive<D> { ... }
fn float_sign<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D> { ... }
fn float_sort<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
descending: bool,
) -> <B as Backend>::FloatTensorPrimitive<D> { ... }
fn float_sort_with_indices<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
descending: bool,
) -> (<B as Backend>::FloatTensorPrimitive<D>, <B as Backend>::IntTensorPrimitive<D>) { ... }
fn float_argsort<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
descending: bool,
) -> <B as Backend>::IntTensorPrimitive<D> { ... }
}
Expand description
Operations on float tensors.
Required Methods§
fn float_from_data<const D: usize>(
data: TensorData,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_from_data<const D: usize>( data: TensorData, device: &<B as Backend>::Device, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_random<const D: usize>(
shape: Shape<D>,
distribution: Distribution,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_random<const D: usize>( shape: Shape<D>, distribution: Distribution, device: &<B as Backend>::Device, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_shape<const D: usize>(
tensor: &<B as Backend>::FloatTensorPrimitive<D>,
) -> Shape<D>
fn float_shape<const D: usize>( tensor: &<B as Backend>::FloatTensorPrimitive<D>, ) -> Shape<D>
fn float_into_data<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> impl Future<Output = TensorData> + Send
fn float_into_data<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> impl Future<Output = TensorData> + Send
fn float_device<const D: usize>(
tensor: &<B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::Device
fn float_device<const D: usize>( tensor: &<B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::Device
fn float_to_device<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_to_device<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, device: &<B as Backend>::Device, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_into_int<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>
fn float_into_int<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::IntTensorPrimitive<D>
fn float_empty<const D: usize>(
shape: Shape<D>,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_empty<const D: usize>( shape: Shape<D>, device: &<B as Backend>::Device, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_add<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_add<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_add_scalar<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_add_scalar<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_sub<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_sub<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_sub_scalar<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_sub_scalar<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_mul<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_mul<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
Multiplies two tensors together element-wise.
fn float_mul_scalar<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_mul_scalar<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_div<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_div<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_div_scalar<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_div_scalar<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_remainder_scalar<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_remainder_scalar<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_matmul<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_matmul<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_recip<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_recip<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
Calculates the reciprocals element-wise
fn float_swap_dims<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim1: usize,
dim2: usize,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_swap_dims<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, dim1: usize, dim2: usize, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_permute<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
axes: [usize; D],
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_permute<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, axes: [usize; D], ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_flip<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
axes: &[usize],
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_flip<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, axes: &[usize], ) -> <B as Backend>::FloatTensorPrimitive<D>
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<const D1: usize, const D2: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D1>,
shape: Shape<D2>,
) -> <B as Backend>::FloatTensorPrimitive<D2>
fn float_reshape<const D1: usize, const D2: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D1>, shape: Shape<D2>, ) -> <B as Backend>::FloatTensorPrimitive<D2>
fn float_gather<const D: usize>(
dim: usize,
tensor: <B as Backend>::FloatTensorPrimitive<D>,
indices: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_gather<const D: usize>( dim: usize, tensor: <B as Backend>::FloatTensorPrimitive<D>, indices: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_scatter<const D: usize>(
dim: usize,
tensor: <B as Backend>::FloatTensorPrimitive<D>,
indices: <B as Backend>::IntTensorPrimitive<D>,
value: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_scatter<const D: usize>( dim: usize, tensor: <B as Backend>::FloatTensorPrimitive<D>, indices: <B as Backend>::IntTensorPrimitive<D>, value: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_select<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive<1>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_select<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, dim: usize, indices: <B as Backend>::IntTensorPrimitive<1>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_select_assign<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive<1>,
value: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_select_assign<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, dim: usize, indices: <B as Backend>::IntTensorPrimitive<1>, value: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
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<const D1: usize, const D2: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D1>,
ranges: [Range<usize>; D2],
) -> <B as Backend>::FloatTensorPrimitive<D1>
fn float_slice<const D1: usize, const D2: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D1>, ranges: [Range<usize>; D2], ) -> <B as Backend>::FloatTensorPrimitive<D1>
fn float_slice_assign<const D1: usize, const D2: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D1>,
ranges: [Range<usize>; D2],
value: <B as Backend>::FloatTensorPrimitive<D1>,
) -> <B as Backend>::FloatTensorPrimitive<D1>
fn float_slice_assign<const D1: usize, const D2: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D1>, ranges: [Range<usize>; D2], value: <B as Backend>::FloatTensorPrimitive<D1>, ) -> <B as Backend>::FloatTensorPrimitive<D1>
fn float_mask_where<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
mask: <B as Backend>::BoolTensorPrimitive<D>,
value: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_mask_where<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, mask: <B as Backend>::BoolTensorPrimitive<D>, value: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
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<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
mask: <B as Backend>::BoolTensorPrimitive<D>,
value: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_mask_fill<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, mask: <B as Backend>::BoolTensorPrimitive<D>, value: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_equal<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_equal<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_equal_elem<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_equal_elem<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_greater<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_greater<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_greater_elem<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_greater_elem<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_greater_equal<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_greater_equal<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_greater_equal_elem<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_greater_equal_elem<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_lower<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_lower<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_lower_elem<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_lower_elem<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_lower_equal<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_lower_equal<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_lower_equal_elem<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_lower_equal_elem<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_sum<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<1>
fn float_sum<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<1>
fn float_sum_dim<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_sum_dim<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, dim: usize, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_mean_dim<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_mean_dim<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, dim: usize, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_exp<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_exp<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_log<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_log<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_log1p<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_log1p<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_powf<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_powf<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_powf_scalar<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
value: f32,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_powf_scalar<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, value: f32, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_sqrt<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_sqrt<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_abs<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_abs<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_cos<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_cos<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_sin<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_sin<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_tanh<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_tanh<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_erf<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_erf<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_argmax<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D>
fn float_argmax<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, dim: usize, ) -> <B as Backend>::IntTensorPrimitive<D>
fn float_argmin<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D>
fn float_argmin<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, dim: usize, ) -> <B as Backend>::IntTensorPrimitive<D>
fn float_expand<const D1: usize, const D2: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D1>,
shape: Shape<D2>,
) -> <B as Backend>::FloatTensorPrimitive<D2>
fn float_expand<const D1: usize, const D2: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D1>, shape: Shape<D2>, ) -> <B as Backend>::FloatTensorPrimitive<D2>
Broadcasts the float tensor
to the given shape
.
Provided Methods§
fn float_zeros<const D: usize>(
shape: Shape<D>,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_zeros<const D: usize>( shape: Shape<D>, device: &<B as Backend>::Device, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_ones<const D: usize>(
shape: Shape<D>,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_ones<const D: usize>( shape: Shape<D>, device: &<B as Backend>::Device, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_full<const D: usize>(
shape: Shape<D>,
fill_value: <B as Backend>::FloatElem,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_full<const D: usize>( shape: Shape<D>, fill_value: <B as Backend>::FloatElem, device: &<B as Backend>::Device, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_repeat_dim<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
times: usize,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_repeat_dim<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, dim: usize, times: usize, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_clamp_min<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
min: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_clamp_min<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, min: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_clamp_max<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
max: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_clamp_max<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, max: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_clamp<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
min: <B as Backend>::FloatElem,
max: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_clamp<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, min: <B as Backend>::FloatElem, max: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_neg<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_neg<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
Negates a tensor element-wise.
fn float_transpose<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_transpose<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_not_equal<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_not_equal<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_not_equal_elem<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_not_equal_elem<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_detach<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_detach<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
Detaches a tensor from the computation graph.
fn float_set_require_grad<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
_require_grad: bool,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_set_require_grad<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, _require_grad: bool, ) -> <B as Backend>::FloatTensorPrimitive<D>
Sets the require_grad
flag of a tensor.
fn float_is_require_grad<const D: usize>(
_tensor: &<B as Backend>::FloatTensorPrimitive<D>,
) -> bool
fn float_is_require_grad<const D: usize>( _tensor: &<B as Backend>::FloatTensorPrimitive<D>, ) -> bool
Returns the require_grad
flag of a tensor.
fn float_prod<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<1>
fn float_prod<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<1>
fn float_prod_dim<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_prod_dim<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, dim: usize, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_mean<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<1>
fn float_mean<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<1>
fn float_into_full_precision<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <<<B as Backend>::FullPrecisionBridge as BackendBridge<B>>::Target as Backend>::FloatTensorPrimitive<D>
fn float_into_full_precision<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <<<B as Backend>::FullPrecisionBridge as BackendBridge<B>>::Target as Backend>::FloatTensorPrimitive<D>
fn float_from_full_precision<const D: usize>(
tensor: <<<B as Backend>::FullPrecisionBridge as BackendBridge<B>>::Target as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_from_full_precision<const D: usize>( tensor: <<<B as Backend>::FullPrecisionBridge as BackendBridge<B>>::Target as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_powi<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_powi<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_powi_scalar<const D: usize>(
lhs: <B as Backend>::FloatTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_powi_scalar<const D: usize>( lhs: <B as Backend>::FloatTensorPrimitive<D>, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_cat<const D: usize>(
tensors: Vec<<B as Backend>::FloatTensorPrimitive<D>>,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_cat<const D: usize>( tensors: Vec<<B as Backend>::FloatTensorPrimitive<D>>, dim: usize, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_max<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<1>
fn float_max<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<1>
fn float_max_dim<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_max_dim<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, dim: usize, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_max_dim_with_indices<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> (<B as Backend>::FloatTensorPrimitive<D>, <B as Backend>::IntTensorPrimitive<D>)
fn float_max_dim_with_indices<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, dim: usize, ) -> (<B as Backend>::FloatTensorPrimitive<D>, <B as Backend>::IntTensorPrimitive<D>)
fn float_min<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<1>
fn float_min<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<1>
fn float_min_dim<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_min_dim<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, dim: usize, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_min_dim_with_indices<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> (<B as Backend>::FloatTensorPrimitive<D>, <B as Backend>::IntTensorPrimitive<D>)
fn float_min_dim_with_indices<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, dim: usize, ) -> (<B as Backend>::FloatTensorPrimitive<D>, <B as Backend>::IntTensorPrimitive<D>)
fn float_narrow<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
start: usize,
length: usize,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_narrow<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, dim: usize, start: usize, length: usize, ) -> <B as Backend>::FloatTensorPrimitive<D>
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<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
chunks: usize,
dim: usize,
) -> Vec<<B as Backend>::FloatTensorPrimitive<D>>
fn float_chunk<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, chunks: usize, dim: usize, ) -> Vec<<B as Backend>::FloatTensorPrimitive<D>>
fn float_any<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<1>
fn float_any<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::BoolTensorPrimitive<1>
fn float_any_dim<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_any_dim<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive<D>
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<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<1>
fn float_all<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::BoolTensorPrimitive<1>
fn float_all_dim<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn float_all_dim<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive<D>
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<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_sign<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_sort<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
descending: bool,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn float_sort<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, dim: usize, descending: bool, ) -> <B as Backend>::FloatTensorPrimitive<D>
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<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
descending: bool,
) -> (<B as Backend>::FloatTensorPrimitive<D>, <B as Backend>::IntTensorPrimitive<D>)
fn float_sort_with_indices<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, dim: usize, descending: bool, ) -> (<B as Backend>::FloatTensorPrimitive<D>, <B as Backend>::IntTensorPrimitive<D>)
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<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>,
dim: usize,
descending: bool,
) -> <B as Backend>::IntTensorPrimitive<D>
fn float_argsort<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D>, dim: usize, descending: bool, ) -> <B as Backend>::IntTensorPrimitive<D>
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.