Trait burn::tensor::ops::IntTensorOps
pub trait IntTensorOps<B>where
B: Backend,{
Show 84 methods
// Required methods
fn int_empty<const D: usize>(
shape: Shape<D>,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_shape<const D: usize>(
tensor: &<B as Backend>::IntTensorPrimitive<D>,
) -> Shape<D>;
fn int_into_data<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> impl Future<Output = TensorData> + Send;
fn int_from_data<const D: usize>(
data: TensorData,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_device<const D: usize>(
tensor: &<B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::Device;
fn int_to_device<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_reshape<const D1: usize, const D2: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D1>,
shape: Shape<D2>,
) -> <B as Backend>::IntTensorPrimitive<D2>;
fn int_slice<const D1: usize, const D2: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D1>,
indices: [Range<usize>; D2],
) -> <B as Backend>::IntTensorPrimitive<D1>;
fn int_slice_assign<const D1: usize, const D2: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D1>,
indices: [Range<usize>; D2],
value: <B as Backend>::IntTensorPrimitive<D1>,
) -> <B as Backend>::IntTensorPrimitive<D1>;
fn int_into_float<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>;
fn int_mask_where<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
mask: <B as Backend>::BoolTensorPrimitive<D>,
source: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_mask_fill<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
mask: <B as Backend>::BoolTensorPrimitive<D>,
value: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_gather<const D: usize>(
dim: usize,
tensor: <B as Backend>::IntTensorPrimitive<D>,
indices: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_scatter<const D: usize>(
dim: usize,
tensor: <B as Backend>::IntTensorPrimitive<D>,
indices: <B as Backend>::IntTensorPrimitive<D>,
value: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_select<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive<1>,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_select_assign<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive<1>,
value: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_equal<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>;
fn int_equal_elem<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive<D>;
fn int_greater<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>;
fn int_greater_elem<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive<D>;
fn int_greater_equal<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>;
fn int_greater_equal_elem<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive<D>;
fn int_lower<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>;
fn int_lower_elem<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive<D>;
fn int_lower_equal<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>;
fn int_lower_equal_elem<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive<D>;
fn int_add<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_add_scalar<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_sub<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_sub_scalar<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_mul<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_mul_scalar<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_div<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_div_scalar<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_remainder_scalar<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_zeros<const D: usize>(
shape: Shape<D>,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_ones<const D: usize>(
shape: Shape<D>,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_sum<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<1>;
fn int_sum_dim<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_prod<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<1>;
fn int_prod_dim<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_mean_dim<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_argmax<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_argmin<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_abs<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_swap_dims<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim1: usize,
dim2: usize,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_permute<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
axes: [usize; D],
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_flip<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
axes: &[usize],
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_random<const D: usize>(
shape: Shape<D>,
distribution: Distribution,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive<D>;
fn int_expand<const D1: usize, const D2: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D1>,
shape: Shape<D2>,
) -> <B as Backend>::IntTensorPrimitive<D2>;
// Provided methods
fn int_repeat_dim<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
times: usize,
) -> <B as Backend>::IntTensorPrimitive<D> { ... }
fn int_cat<const D: usize>(
tensors: Vec<<B as Backend>::IntTensorPrimitive<D>>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D> { ... }
fn int_not_equal<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D> { ... }
fn int_not_equal_elem<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive<D> { ... }
fn int_powi<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D> { ... }
fn int_powf<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D> { ... }
fn int_powi_scalar<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive<D> { ... }
fn int_powf_scalar<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: f32,
) -> <B as Backend>::IntTensorPrimitive<D> { ... }
fn int_clamp_min<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
min: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive<D> { ... }
fn int_clamp_max<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
max: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive<D> { ... }
fn int_clamp<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
min: <B as Backend>::IntElem,
max: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive<D> { ... }
fn int_neg<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D> { ... }
fn int_full<const D: usize>(
shape: Shape<D>,
fill_value: <B as Backend>::IntElem,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive<D> { ... }
fn int_mean<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<1> { ... }
fn int_max<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<1> { ... }
fn int_max_dim<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D> { ... }
fn int_max_dim_with_indices<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> (<B as Backend>::IntTensorPrimitive<D>, <B as Backend>::IntTensorPrimitive<D>) { ... }
fn int_min<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<1> { ... }
fn int_min_dim<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D> { ... }
fn int_min_dim_with_indices<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> (<B as Backend>::IntTensorPrimitive<D>, <B as Backend>::IntTensorPrimitive<D>) { ... }
fn int_transpose<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D> { ... }
fn int_narrow<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
start: usize,
length: usize,
) -> <B as Backend>::IntTensorPrimitive<D> { ... }
fn int_cartesian_grid<S, const D: usize, const D2: usize>(
shape: S,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive<D2>
where S: Into<Shape<D>> { ... }
fn int_chunk<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
chunks: usize,
dim: usize,
) -> Vec<<B as Backend>::IntTensorPrimitive<D>> { ... }
fn int_arange_step(
range: Range<i64>,
step: usize,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive<1> { ... }
fn int_arange(
range: Range<i64>,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive<1> { ... }
fn int_any<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<1> { ... }
fn int_any_dim<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive<D> { ... }
fn int_all<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<1> { ... }
fn int_all_dim<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive<D> { ... }
fn int_sign<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D> { ... }
fn int_sort<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
descending: bool,
) -> <B as Backend>::IntTensorPrimitive<D> { ... }
fn int_sort_with_indices<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
descending: bool,
) -> (<B as Backend>::IntTensorPrimitive<D>, <B as Backend>::IntTensorPrimitive<D>) { ... }
fn int_argsort<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
descending: bool,
) -> <B as Backend>::IntTensorPrimitive<D> { ... }
}
Expand description
Int Tensor API for basic and numeric operations, see tensor for documentation on each function.
Required Methods§
fn int_empty<const D: usize>(
shape: Shape<D>,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_empty<const D: usize>( shape: Shape<D>, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_shape<const D: usize>(
tensor: &<B as Backend>::IntTensorPrimitive<D>,
) -> Shape<D>
fn int_shape<const D: usize>( tensor: &<B as Backend>::IntTensorPrimitive<D>, ) -> Shape<D>
fn int_into_data<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> impl Future<Output = TensorData> + Send
fn int_into_data<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, ) -> impl Future<Output = TensorData> + Send
fn int_from_data<const D: usize>(
data: TensorData,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_from_data<const D: usize>( data: TensorData, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_device<const D: usize>(
tensor: &<B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::Device
fn int_device<const D: usize>( tensor: &<B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::Device
fn int_to_device<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_to_device<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive<D>
Moves the tensor to the given device.
fn int_reshape<const D1: usize, const D2: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D1>,
shape: Shape<D2>,
) -> <B as Backend>::IntTensorPrimitive<D2>
fn int_reshape<const D1: usize, const D2: usize>( tensor: <B as Backend>::IntTensorPrimitive<D1>, shape: Shape<D2>, ) -> <B as Backend>::IntTensorPrimitive<D2>
fn int_slice<const D1: usize, const D2: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D1>,
indices: [Range<usize>; D2],
) -> <B as Backend>::IntTensorPrimitive<D1>
fn int_slice<const D1: usize, const D2: usize>( tensor: <B as Backend>::IntTensorPrimitive<D1>, indices: [Range<usize>; D2], ) -> <B as Backend>::IntTensorPrimitive<D1>
fn int_slice_assign<const D1: usize, const D2: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D1>,
indices: [Range<usize>; D2],
value: <B as Backend>::IntTensorPrimitive<D1>,
) -> <B as Backend>::IntTensorPrimitive<D1>
fn int_slice_assign<const D1: usize, const D2: usize>( tensor: <B as Backend>::IntTensorPrimitive<D1>, indices: [Range<usize>; D2], value: <B as Backend>::IntTensorPrimitive<D1>, ) -> <B as Backend>::IntTensorPrimitive<D1>
fn int_into_float<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::FloatTensorPrimitive<D>
fn int_into_float<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::FloatTensorPrimitive<D>
fn int_mask_where<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
mask: <B as Backend>::BoolTensorPrimitive<D>,
source: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_mask_where<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, mask: <B as Backend>::BoolTensorPrimitive<D>, source: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_mask_fill<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
mask: <B as Backend>::BoolTensorPrimitive<D>,
value: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_mask_fill<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, mask: <B as Backend>::BoolTensorPrimitive<D>, value: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_gather<const D: usize>(
dim: usize,
tensor: <B as Backend>::IntTensorPrimitive<D>,
indices: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_gather<const D: usize>( dim: usize, tensor: <B as Backend>::IntTensorPrimitive<D>, indices: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::IntTensorPrimitive<D>
Gather elements from the tensor at the given indices.
§Arguments
dim
- The dimension to gather from.tensor
- The tensor.indices
- The indices.
fn int_scatter<const D: usize>(
dim: usize,
tensor: <B as Backend>::IntTensorPrimitive<D>,
indices: <B as Backend>::IntTensorPrimitive<D>,
value: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_scatter<const D: usize>( dim: usize, tensor: <B as Backend>::IntTensorPrimitive<D>, indices: <B as Backend>::IntTensorPrimitive<D>, value: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_select<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive<1>,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_select<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, dim: usize, indices: <B as Backend>::IntTensorPrimitive<1>, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_select_assign<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive<1>,
value: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_select_assign<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, dim: usize, indices: <B as Backend>::IntTensorPrimitive<1>, value: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_equal<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_equal<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_equal_elem<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_equal_elem<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_greater<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_greater<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_greater_elem<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_greater_elem<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_greater_equal<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_greater_equal<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_greater_equal_elem<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_greater_equal_elem<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_lower<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_lower<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_lower_elem<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_lower_elem<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_lower_equal<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_lower_equal<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_lower_equal_elem<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_lower_equal_elem<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_add<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_add<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_add_scalar<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_add_scalar<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_sub<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_sub<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_sub_scalar<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_sub_scalar<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_mul<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_mul<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_mul_scalar<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_mul_scalar<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_div<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_div<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_div_scalar<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_div_scalar<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_remainder_scalar<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_remainder_scalar<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_zeros<const D: usize>(
shape: Shape<D>,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_zeros<const D: usize>( shape: Shape<D>, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_ones<const D: usize>(
shape: Shape<D>,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_ones<const D: usize>( shape: Shape<D>, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_sum<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<1>
fn int_sum<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::IntTensorPrimitive<1>
fn int_sum_dim<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_sum_dim<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, dim: usize, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_prod<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<1>
fn int_prod<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::IntTensorPrimitive<1>
fn int_prod_dim<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_prod_dim<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, dim: usize, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_mean_dim<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_mean_dim<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, dim: usize, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_argmax<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_argmax<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, dim: usize, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_argmin<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_argmin<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, dim: usize, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_abs<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_abs<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_swap_dims<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim1: usize,
dim2: usize,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_swap_dims<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, dim1: usize, dim2: usize, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_permute<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
axes: [usize; D],
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_permute<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, axes: [usize; D], ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_flip<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
axes: &[usize],
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_flip<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, axes: &[usize], ) -> <B as Backend>::IntTensorPrimitive<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 int_random<const D: usize>(
shape: Shape<D>,
distribution: Distribution,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_random<const D: usize>( shape: Shape<D>, distribution: Distribution, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_expand<const D1: usize, const D2: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D1>,
shape: Shape<D2>,
) -> <B as Backend>::IntTensorPrimitive<D2>
fn int_expand<const D1: usize, const D2: usize>( tensor: <B as Backend>::IntTensorPrimitive<D1>, shape: Shape<D2>, ) -> <B as Backend>::IntTensorPrimitive<D2>
Broadcasts the int tensor
to the given shape
.
Provided Methods§
fn int_repeat_dim<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
times: usize,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_repeat_dim<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, dim: usize, times: usize, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_cat<const D: usize>(
tensors: Vec<<B as Backend>::IntTensorPrimitive<D>>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_cat<const D: usize>( tensors: Vec<<B as Backend>::IntTensorPrimitive<D>>, dim: usize, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_not_equal<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_not_equal<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_not_equal_elem<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_not_equal_elem<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_powi<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_powi<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_powf<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::FloatTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_powf<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::FloatTensorPrimitive<D>, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_powi_scalar<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_powi_scalar<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_powf_scalar<const D: usize>(
lhs: <B as Backend>::IntTensorPrimitive<D>,
rhs: f32,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_powf_scalar<const D: usize>( lhs: <B as Backend>::IntTensorPrimitive<D>, rhs: f32, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_clamp_min<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
min: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_clamp_min<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, min: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_clamp_max<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
max: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_clamp_max<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, max: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_clamp<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
min: <B as Backend>::IntElem,
max: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_clamp<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, min: <B as Backend>::IntElem, max: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_neg<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_neg<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_full<const D: usize>(
shape: Shape<D>,
fill_value: <B as Backend>::IntElem,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_full<const D: usize>( shape: Shape<D>, fill_value: <B as Backend>::IntElem, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_mean<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<1>
fn int_mean<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::IntTensorPrimitive<1>
fn int_max<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<1>
fn int_max<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::IntTensorPrimitive<1>
fn int_max_dim<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_max_dim<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, dim: usize, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_max_dim_with_indices<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> (<B as Backend>::IntTensorPrimitive<D>, <B as Backend>::IntTensorPrimitive<D>)
fn int_max_dim_with_indices<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, dim: usize, ) -> (<B as Backend>::IntTensorPrimitive<D>, <B as Backend>::IntTensorPrimitive<D>)
fn int_min<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<1>
fn int_min<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::IntTensorPrimitive<1>
fn int_min_dim<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_min_dim<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, dim: usize, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_min_dim_with_indices<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> (<B as Backend>::IntTensorPrimitive<D>, <B as Backend>::IntTensorPrimitive<D>)
fn int_min_dim_with_indices<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, dim: usize, ) -> (<B as Backend>::IntTensorPrimitive<D>, <B as Backend>::IntTensorPrimitive<D>)
fn int_transpose<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_transpose<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_narrow<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
start: usize,
length: usize,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_narrow<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, dim: usize, start: usize, length: usize, ) -> <B as Backend>::IntTensorPrimitive<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 int_cartesian_grid<S, const D: usize, const D2: usize>(
shape: S,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive<D2>
fn int_cartesian_grid<S, const D: usize, const D2: usize>( shape: S, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive<D2>
Generates a cartesian grid for the given tensor shape on the specified device.
The generated tensor is of dimension D2 = D + 1
, where each element at dimension D contains the cartesian grid coordinates for that element.
§Arguments
shape
- The shape specifying the dimensions of the tensor.device
- The device to create the tensor on.
§Panics
Panics if D2
is not equal to D+1
.
§Examples
use burn_tensor::Int;
use burn_tensor::{backend::Backend, Shape, Tensor};
fn example<B: Backend>() {
let device = Default::default();
let result: Tensor<B, 3, _> = Tensor::<B, 2, Int>::cartesian_grid([2, 3], &device);
println!("{}", result);
}
fn int_chunk<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
chunks: usize,
dim: usize,
) -> Vec<<B as Backend>::IntTensorPrimitive<D>>
fn int_chunk<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, chunks: usize, dim: usize, ) -> Vec<<B as Backend>::IntTensorPrimitive<D>>
fn int_arange_step(
range: Range<i64>,
step: usize,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive<1>
fn int_arange_step( range: Range<i64>, step: usize, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive<1>
fn int_arange(
range: Range<i64>,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive<1>
fn int_arange( range: Range<i64>, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive<1>
fn int_any<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<1>
fn int_any<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::BoolTensorPrimitive<1>
fn int_any_dim<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_any_dim<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive<D>
Tests if any element in the int 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 int_all<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::BoolTensorPrimitive<1>
fn int_all<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::BoolTensorPrimitive<1>
fn int_all_dim<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive<D>
fn int_all_dim<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive<D>
Tests if all elements in the int 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 int_sign<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_sign<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, ) -> <B as Backend>::IntTensorPrimitive<D>
fn int_sort<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
descending: bool,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_sort<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, dim: usize, descending: bool, ) -> <B as Backend>::IntTensorPrimitive<D>
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, where the elements are sorted by value.
fn int_sort_with_indices<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
descending: bool,
) -> (<B as Backend>::IntTensorPrimitive<D>, <B as Backend>::IntTensorPrimitive<D>)
fn int_sort_with_indices<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<D>, dim: usize, descending: bool, ) -> (<B as Backend>::IntTensorPrimitive<D>, <B as Backend>::IntTensorPrimitive<D>)
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.
§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 int_argsort<const D: usize>(
tensor: <B as Backend>::IntTensorPrimitive<D>,
dim: usize,
descending: bool,
) -> <B as Backend>::IntTensorPrimitive<D>
fn int_argsort<const D: usize>( tensor: <B as Backend>::IntTensorPrimitive<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.