pub struct Wgpu<G = AutoGraphicsApi, F = f32, I = i32>{ /* private fields */ }Expand description
Tensor backend that uses the [wgpu] crate for executing GPU compute shaders.
This backend can target multiple graphics APIs, including:
- Vulkan on Linux, Windows, and Android.
- OpenGL on Linux, Windows, and Android.
- DirectX 12 on Windows.
- Metal on Apple hardware.
- WebGPU on supported browsers and
wasmruntimes.
Trait Implementations§
source§impl<G, F, I> ActivationOps<Wgpu<G, F, I>> for Wgpu<G, F, I>
impl<G, F, I> ActivationOps<Wgpu<G, F, I>> for Wgpu<G, F, I>
source§fn relu<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>
) -> <B as Backend>::FloatTensorPrimitive<D>
fn relu<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D> ) -> <B as Backend>::FloatTensorPrimitive<D>
Applies the ReLU activation function. Read more
source§fn relu_backward<const D: usize>(
output: <B as Backend>::FloatTensorPrimitive<D>,
grad: <B as Backend>::FloatTensorPrimitive<D>
) -> <B as Backend>::FloatTensorPrimitive<D>
fn relu_backward<const D: usize>( output: <B as Backend>::FloatTensorPrimitive<D>, grad: <B as Backend>::FloatTensorPrimitive<D> ) -> <B as Backend>::FloatTensorPrimitive<D>
Applies the ReLU activation function backward. Read more
source§fn gelu<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>
) -> <B as Backend>::FloatTensorPrimitive<D>
fn gelu<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D> ) -> <B as Backend>::FloatTensorPrimitive<D>
Applies the Gelu activation function. Read more
source§fn gelu_backward<const D: usize>(
x: <B as Backend>::FloatTensorPrimitive<D>,
grad: <B as Backend>::FloatTensorPrimitive<D>
) -> <B as Backend>::FloatTensorPrimitive<D>
fn gelu_backward<const D: usize>( x: <B as Backend>::FloatTensorPrimitive<D>, grad: <B as Backend>::FloatTensorPrimitive<D> ) -> <B as Backend>::FloatTensorPrimitive<D>
Applies the Gelu activation function backward. Read more
source§fn sigmoid<const D: usize>(
tensor: <B as Backend>::FloatTensorPrimitive<D>
) -> <B as Backend>::FloatTensorPrimitive<D>
fn sigmoid<const D: usize>( tensor: <B as Backend>::FloatTensorPrimitive<D> ) -> <B as Backend>::FloatTensorPrimitive<D>
Applies the Sigmoid activation function. Read more
source§fn sigmoid_backward<const D: usize>(
output: <B as Backend>::FloatTensorPrimitive<D>,
grad: <B as Backend>::FloatTensorPrimitive<D>
) -> <B as Backend>::FloatTensorPrimitive<D>
fn sigmoid_backward<const D: usize>( output: <B as Backend>::FloatTensorPrimitive<D>, grad: <B as Backend>::FloatTensorPrimitive<D> ) -> <B as Backend>::FloatTensorPrimitive<D>
Applies the Sigmoid activation function backward. Read more
source§impl<G, F, I> Backend for Wgpu<G, F, I>
impl<G, F, I> Backend for Wgpu<G, F, I>
§type Device = WgpuDevice
type Device = WgpuDevice
Device type.
§type FullPrecisionBackend = Wgpu<G>
type FullPrecisionBackend = Wgpu<G>
Pointer to another backend that have a full precision float element type
§type FullPrecisionElem = f32
type FullPrecisionElem = f32
Full precision float element type.
§type FloatTensorPrimitive<const D: usize> = WgpuTensor<F, D>
type FloatTensorPrimitive<const D: usize> = WgpuTensor<F, D>
Tensor primitive to be used for all float operations.
§type IntTensorPrimitive<const D: usize> = WgpuTensor<I, D>
type IntTensorPrimitive<const D: usize> = WgpuTensor<I, D>
Tensor primitive to be used for all int operations.
§type BoolTensorPrimitive<const D: usize> = WgpuTensor<u32, D>
type BoolTensorPrimitive<const D: usize> = WgpuTensor<u32, D>
Tensor primitive to be used for all bool operations.
source§fn ad_enabled() -> bool
fn ad_enabled() -> bool
If autodiff is enabled.
source§impl<G, F, I> BoolTensorOps<Wgpu<G, F, I>> for Wgpu<G, F, I>
impl<G, F, I> BoolTensorOps<Wgpu<G, F, I>> for Wgpu<G, F, I>
source§fn bool_empty<const D: usize>(
shape: Shape<D>,
device: &<Wgpu<G, F, I> as Backend>::Device
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn bool_empty<const D: usize>( shape: Shape<D>, device: &<Wgpu<G, F, I> as Backend>::Device ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Creates a new bool tensor. Read more
source§fn bool_shape<const D: usize>(
tensor: &<Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
) -> Shape<D>
fn bool_shape<const D: usize>( tensor: &<Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D> ) -> Shape<D>
Returns the shape of the tensor. Read more
source§fn bool_into_data<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
) -> Reader<Data<bool, D>>
fn bool_into_data<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D> ) -> Reader<Data<bool, D>>
Converts the tensor to a data structure. Read more
source§fn bool_from_data<const D: usize>(
data: Data<bool, D>,
device: &<Wgpu<G, F, I> as Backend>::Device
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn bool_from_data<const D: usize>( data: Data<bool, D>, device: &<Wgpu<G, F, I> as Backend>::Device ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Creates a tensor from the data structure. Read more
source§fn bool_into_int<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn bool_into_int<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Converts bool tensor to int tensor. Read more
source§fn bool_device<const D: usize>(
tensor: &<Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::Device
fn bool_device<const D: usize>( tensor: &<Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::Device
Gets the device of the tensor. Read more
source§fn bool_to_device<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>,
device: &<Wgpu<G, F, I> as Backend>::Device
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn bool_to_device<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>, device: &<Wgpu<G, F, I> as Backend>::Device ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Moves the tensor to the device.
source§fn bool_reshape<const D1: usize, const D2: usize>(
tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D1>,
shape: Shape<D2>
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D2>
fn bool_reshape<const D1: usize, const D2: usize>( tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D1>, shape: Shape<D2> ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D2>
Reshapes the tensor. Read more
source§fn bool_slice<const D1: usize, const D2: usize>(
tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D1>,
ranges: [Range<usize>; D2]
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D1>
fn bool_slice<const D1: usize, const D2: usize>( tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D1>, ranges: [Range<usize>; D2] ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D1>
Gets the values from the tensor for the given ranges. Read more
source§fn bool_slice_assign<const D1: usize, const D2: usize>(
tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D1>,
ranges: [Range<usize>; D2],
value: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D1>
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D1>
fn bool_slice_assign<const D1: usize, const D2: usize>( tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D1>, ranges: [Range<usize>; D2], value: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D1> ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D1>
Sets the values in the tensor for the given ranges. Read more
source§fn bool_cat<const D: usize>(
tensors: Vec<<Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>>,
dim: usize
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn bool_cat<const D: usize>( tensors: Vec<<Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>>, dim: usize ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Concatenates the tensors along the given dimension. Read more
source§fn bool_equal<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn bool_equal<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Equates the two tensors. Read more
source§fn bool_not<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn bool_not<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Inverses boolean values. Read more
source§fn bool_into_float<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn bool_into_float<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Converts bool tensor to float tensor. Read more
source§fn bool_swap_dims<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>,
dim1: usize,
dim2: usize
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn bool_swap_dims<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>, dim1: usize, dim2: usize ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Swaps two dimensions of a bool tensor. Read more
source§fn bool_repeat<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>,
dim: usize,
times: usize
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn bool_repeat<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>, dim: usize, times: usize ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Repeats one dimension of the tensor a given number of times along that dimension. Read more
source§fn bool_to_data<const D: usize>(
tensor: &<B as Backend>::BoolTensorPrimitive<D>
) -> Reader<Data<bool, D>>
fn bool_to_data<const D: usize>( tensor: &<B as Backend>::BoolTensorPrimitive<D> ) -> Reader<Data<bool, D>>
Gets the data from the tensor. Read more
source§fn bool_transpose<const D: usize>(
tensor: <B as Backend>::BoolTensorPrimitive<D>
) -> <B as Backend>::BoolTensorPrimitive<D>
fn bool_transpose<const D: usize>( tensor: <B as Backend>::BoolTensorPrimitive<D> ) -> <B as Backend>::BoolTensorPrimitive<D>
Transposes a bool tensor. Read more
source§fn bool_narrow<const D: usize>(
tensor: <B as Backend>::BoolTensorPrimitive<D>,
dim: usize,
start: usize,
length: usize
) -> <B as Backend>::BoolTensorPrimitive<D>
fn bool_narrow<const D: usize>( tensor: <B as Backend>::BoolTensorPrimitive<D>, dim: usize, start: usize, length: usize ) -> <B as Backend>::BoolTensorPrimitive<D>
Returns a new tensor with the given dimension narrowed to the given range. Read more
source§fn bool_chunk<const D: usize>(
tensor: <B as Backend>::BoolTensorPrimitive<D>,
chunks: usize,
dim: usize
) -> Vec<<B as Backend>::BoolTensorPrimitive<D>>
fn bool_chunk<const D: usize>( tensor: <B as Backend>::BoolTensorPrimitive<D>, chunks: usize, dim: usize ) -> Vec<<B as Backend>::BoolTensorPrimitive<D>>
Split the tensor along the given dimension into chunks. Read more
source§impl<G, F, I> FloatTensorOps<Wgpu<G, F, I>> for Wgpu<G, F, I>
impl<G, F, I> FloatTensorOps<Wgpu<G, F, I>> for Wgpu<G, F, I>
source§fn float_from_data<const D: usize>(
data: Data<<Wgpu<G, F, I> as Backend>::FloatElem, D>,
device: &<Wgpu<G, F, I> as Backend>::Device
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_from_data<const D: usize>( data: Data<<Wgpu<G, F, I> as Backend>::FloatElem, D>, device: &<Wgpu<G, F, I> as Backend>::Device ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Creates a new tensor from the data structure. Read more
source§fn float_random<const D: usize>(
shape: Shape<D>,
distribution: Distribution,
device: &<Wgpu<G, F, I> as Backend>::Device
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_random<const D: usize>( shape: Shape<D>, distribution: Distribution, device: &<Wgpu<G, F, I> as Backend>::Device ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Creates a new tensor with random values. Read more
source§fn float_shape<const D: usize>(
tensor: &<Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> Shape<D>
fn float_shape<const D: usize>( tensor: &<Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> Shape<D>
Gets the shape of the tensor. Read more
source§fn float_into_data<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> Reader<Data<<Wgpu<G, F, I> as Backend>::FloatElem, D>>
fn float_into_data<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> Reader<Data<<Wgpu<G, F, I> as Backend>::FloatElem, D>>
Converts the tensor to a data structure. Read more
source§fn float_device<const D: usize>(
tensor: &<Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::Device
fn float_device<const D: usize>( tensor: &<Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::Device
Gets the device of the tensor. Read more
source§fn float_to_device<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
device: &<Wgpu<G, F, I> as Backend>::Device
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_to_device<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, device: &<Wgpu<G, F, I> as Backend>::Device ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Moves the tensor to the given device. Read more
source§fn float_empty<const D: usize>(
shape: Shape<D>,
device: &<Wgpu<G, F, I> as Backend>::Device
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_empty<const D: usize>( shape: Shape<D>, device: &<Wgpu<G, F, I> as Backend>::Device ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Creates an empty tensor with the given shape. Read more
source§fn float_add<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_add<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Adds two tensors together. Read more
source§fn float_add_scalar<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::FloatElem
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_add_scalar<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::FloatElem ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Adds a scalar to a tensor. Read more
source§fn float_zeros<const D: usize>(
shape: Shape<D>,
device: &<Wgpu<G, F, I> as Backend>::Device
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_zeros<const D: usize>( shape: Shape<D>, device: &<Wgpu<G, F, I> as Backend>::Device ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Creates a new tensor with zeros. Read more
source§fn float_full<const D: usize>(
shape: Shape<D>,
fill_value: <Wgpu<G, F, I> as Backend>::FloatElem,
device: &WgpuDevice
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_full<const D: usize>( shape: Shape<D>, fill_value: <Wgpu<G, F, I> as Backend>::FloatElem, device: &WgpuDevice ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Creates a tensor filled with given value. Read more
source§fn float_ones<const D: usize>(
shape: Shape<D>,
device: &<Wgpu<G, F, I> as Backend>::Device
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_ones<const D: usize>( shape: Shape<D>, device: &<Wgpu<G, F, I> as Backend>::Device ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Creates a new tensor with ones. Read more
source§fn float_sub<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_sub<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Subtracts two tensors. Read more
source§fn float_sub_scalar<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::FloatElem
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_sub_scalar<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::FloatElem ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Subtracts a scalar from a tensor. Read more
source§fn float_mul<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_mul<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Multiplies two tensors together element-wise.
source§fn float_mul_scalar<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::FloatElem
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_mul_scalar<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::FloatElem ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Multiplies a tensor by a scalar. Read more
source§fn float_div<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_div<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Divides two tensors element-wise. Read more
source§fn float_div_scalar<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::FloatElem
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_div_scalar<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::FloatElem ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Divides a tensor by a scalar. Read more
source§fn float_matmul<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_matmul<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Multiplies two tensors together using matrix multiplication. Read more
source§fn float_swap_dims<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
dim1: usize,
dim2: usize
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_swap_dims<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, dim1: usize, dim2: usize ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Swaps two dimensions of a tensor. Read more
source§fn float_reshape<const D1: usize, const D2: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D1>,
shape: Shape<D2>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D2>
fn float_reshape<const D1: usize, const D2: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D1>, shape: Shape<D2> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D2>
Reshapes a tensor. Read more
source§fn float_gather<const D: usize>(
dim: usize,
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
indices: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_gather<const D: usize>( dim: usize, tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, indices: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Gather elements from a tensor. Read more
source§fn float_scatter<const D: usize>(
dim: usize,
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
indices: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
value: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_scatter<const D: usize>( dim: usize, tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, indices: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, value: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Scatter elements into a tensor. Read more
source§fn float_select<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
dim: usize,
indices: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<1>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_select<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, dim: usize, indices: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<1> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Select tensor elements along the given dimension corresponding for the given indices. Read more
source§fn float_select_assign<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
dim: usize,
indices: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<1>,
value: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_select_assign<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, dim: usize, indices: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<1>, value: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Assign the selected elements along the given dimension corresponding for the given indices
to the given value. Read more
source§fn float_slice<const D1: usize, const D2: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D1>,
ranges: [Range<usize>; D2]
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D1>
fn float_slice<const D1: usize, const D2: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D1>, ranges: [Range<usize>; D2] ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D1>
Select tensor elements corresponding for the given ranges. Read more
source§fn float_slice_assign<const D1: usize, const D2: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D1>,
ranges: [Range<usize>; D2],
value: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D1>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D1>
fn float_slice_assign<const D1: usize, const D2: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D1>, ranges: [Range<usize>; D2], value: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D1> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D1>
Assign the selected elements corresponding for the given ranges to the given value. Read more
source§fn float_mask_where<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
mask: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>,
value: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_mask_where<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, mask: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>, value: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Update the given tensor with the value tensor where the mask is true. Read more
source§fn float_mask_fill<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
mask: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>,
value: <Wgpu<G, F, I> as Backend>::FloatElem
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_mask_fill<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, mask: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>, value: <Wgpu<G, F, I> as Backend>::FloatElem ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Update the given tensor with the value where the mask is true. Read more
source§fn float_equal<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn float_equal<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Equal comparison of two tensors. Read more
source§fn float_equal_elem<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::FloatElem
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn float_equal_elem<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::FloatElem ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Equal comparison of a tensor and a scalar. Read more
source§fn float_greater<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn float_greater<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Greater than comparison of two tensors. Read more
source§fn float_greater_elem<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::FloatElem
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn float_greater_elem<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::FloatElem ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Greater than comparison of a tensor and a scalar. Read more
source§fn float_greater_equal<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn float_greater_equal<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Greater than or equal comparison of two tensors. Read more
source§fn float_greater_equal_elem<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::FloatElem
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn float_greater_equal_elem<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::FloatElem ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Greater than or equal comparison of a tensor and a scalar. Read more
source§fn float_lower<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn float_lower<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Less than comparison of two tensors. Read more
source§fn float_lower_elem<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::FloatElem
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn float_lower_elem<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::FloatElem ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Less than comparison of a tensor and a scalar. Read more
source§fn float_lower_equal<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn float_lower_equal<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Less than or equal comparison of two tensors. Read more
source§fn float_lower_equal_elem<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::FloatElem
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn float_lower_equal_elem<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::FloatElem ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Less than or equal comparison of a tensor and a scalar. Read more
source§fn float_sum<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<1>
fn float_sum<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<1>
Sum of all elements in a tensor. Read more
source§fn float_sum_dim<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
dim: usize
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_sum_dim<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, dim: usize ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Sum of all elements in a tensor along a dimension. Read more
source§fn float_mean_dim<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
dim: usize
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_mean_dim<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, dim: usize ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Mean of all elements in a tensor along a dimension. Read more
source§fn float_to_full_precision<const D: usize>(
tensor: &<Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <<Wgpu<G, F, I> as Backend>::FullPrecisionBackend as Backend>::FloatTensorPrimitive<D>
fn float_to_full_precision<const D: usize>( tensor: &<Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <<Wgpu<G, F, I> as Backend>::FullPrecisionBackend as Backend>::FloatTensorPrimitive<D>
Converts a tensor to full precision. Read more
source§fn float_from_full_precision<const D: usize>(
tensor: <<Wgpu<G, F, I> as Backend>::FullPrecisionBackend as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_from_full_precision<const D: usize>( tensor: <<Wgpu<G, F, I> as Backend>::FullPrecisionBackend as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Converts a tensor from full precision. Read more
source§fn float_exp<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_exp<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Returns a new tensor with exponential values. Read more
source§fn float_log<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_log<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Returns a new tensor with natural logarithm values. Read more
source§fn float_log1p<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_log1p<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Returns a new tensor with logarithm values of (1 + Xi). Read more
source§fn float_powf_scalar<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
rhs: f32
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_powf_scalar<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, rhs: f32 ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Returns a new tensor with values raised to the power of float
value. Read moresource§fn float_sqrt<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_sqrt<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Returns a new tensor with square root values. Read more
source§fn float_abs<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_abs<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Returns a new tensor with absolute values. Read more
source§fn float_cos<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_cos<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Returns a new tensor with cosine values. Read more
source§fn float_sin<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_sin<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Returns a new tensor with sine values. Read more
source§fn float_tanh<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_tanh<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Returns a new tensor with tangent values. Read more
source§fn float_erf<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_erf<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Returns a new tensor with the error function values. Read more
source§fn float_cat<const D: usize>(
tensors: Vec<<Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>>,
dim: usize
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_cat<const D: usize>( tensors: Vec<<Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>>, dim: usize ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Catcatenates tensors along a dimension. Read more
source§fn float_argmax<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
dim: usize
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn float_argmax<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, dim: usize ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Gets the indices of the maximum elements of a tensor along an axis. Read more
source§fn float_argmin<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
dim: usize
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn float_argmin<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, dim: usize ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Gets the indices of the minimum elements of a tensor along an axis. Read more
source§fn float_into_int<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn float_into_int<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Converts float tensor to int tensor. Read more
source§fn float_clamp<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
min: <Wgpu<G, F, I> as Backend>::FloatElem,
max: <Wgpu<G, F, I> as Backend>::FloatElem
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_clamp<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, min: <Wgpu<G, F, I> as Backend>::FloatElem, max: <Wgpu<G, F, I> as Backend>::FloatElem ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Clamps a tensor between a minimum and maximum value. Read more
source§fn float_recip<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_recip<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Calculates the reciprocals elementwise
source§fn float_repeat<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
dim: usize,
times: usize
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_repeat<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, dim: usize, times: usize ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Repeat the tensor along the given dimension. Read more
source§fn float_powf<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_powf<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Elementwise power with a FloatTensor. Read more
source§fn float_to_data<const D: usize>(
tensor: &<B as Backend>::FloatTensorPrimitive<D>
) -> Reader<Data<<B as Backend>::FloatElem, D>>
fn float_to_data<const D: usize>( tensor: &<B as Backend>::FloatTensorPrimitive<D> ) -> Reader<Data<<B as Backend>::FloatElem, D>>
Converts the tensor to a data structure. Read more
source§fn float_arange(
range: Range<usize>,
device: &<B as Backend>::Device
) -> <B as Backend>::IntTensorPrimitive<1>
fn float_arange( range: Range<usize>, device: &<B as Backend>::Device ) -> <B as Backend>::IntTensorPrimitive<1>
Creates a new tensor with values from the given range. Read more
source§fn float_arange_step(
range: Range<usize>,
step: usize,
device: &<B as Backend>::Device
) -> <B as Backend>::IntTensorPrimitive<1>
fn float_arange_step( range: Range<usize>, step: usize, device: &<B as Backend>::Device ) -> <B as Backend>::IntTensorPrimitive<1>
Creates a new tensor with values from the given range with the given step size. Read more
source§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>
Clamps a tensor under a minimum value. Read more
source§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>
Clamps a tensor over a maximum value. Read more
source§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.
source§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>
Transposes a tensor. Read more
source§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.
source§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.source§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.source§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>
Mean of all elements in a tensor. Read more
source§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>
Elementwise power with an IntTensor. Read more
source§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>
raises a tensor to the power of a int scalar. Read more
source§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>
Gets the maximum element of a tensor. Read more
source§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>
Gets the maximum elements of a tensor along an axis. Read more
source§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>)
Gets the maximum elements of a tensor along an axis and their indices. Read more
source§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>
Gets the minimum element of a tensor. Read more
source§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>
Gets the minimum elements of a tensor along an axis. Read more
source§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>)
Gets the minimum elements of a tensor along an axis and their indices. Read more
source§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. Read more
source§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>>
Split the tensor along the given dimension into chunks. Read more
source§impl<G, F, I> FusionBackend for Wgpu<G, F, I>
impl<G, F, I> FusionBackend for Wgpu<G, F, I>
§type OptimizationState = WgpuOptimizationState
type OptimizationState = WgpuOptimizationState
The state that can be serialized for an optimization.
§type Optimization = WgpuOptimization<G, F, I>
type Optimization = WgpuOptimization<G, F, I>
Optimization type for the backend.
§type FusionDevice = WgpuDevice
type FusionDevice = WgpuDevice
The device type that can return an ID. Read more
§type FusionClient = MutexFusionClient<Wgpu<G, F, I>>
type FusionClient = MutexFusionClient<Wgpu<G, F, I>>
What kind of client should be used.
source§fn optimizations(
device: WgpuDevice
) -> Vec<Box<dyn OptimizationBuilder<<Wgpu<G, F, I> as FusionBackend>::Optimization>>>
fn optimizations( device: WgpuDevice ) -> Vec<Box<dyn OptimizationBuilder<<Wgpu<G, F, I> as FusionBackend>::Optimization>>>
The list of optimizations that will be used to optimize the computational graph.
source§fn float_tensor<const D: usize>(
handle: <Wgpu<G, F, I> as FusionBackend>::Handle,
shape: Shape<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn float_tensor<const D: usize>( handle: <Wgpu<G, F, I> as FusionBackend>::Handle, shape: Shape<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Convert a handle to a float tensor.
source§fn int_tensor<const D: usize>(
handle: <Wgpu<G, F, I> as FusionBackend>::Handle,
shape: Shape<D>
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_tensor<const D: usize>( handle: <Wgpu<G, F, I> as FusionBackend>::Handle, shape: Shape<D> ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Convert a handle to an int tensor.
source§fn bool_tensor<const D: usize>(
handle: <Wgpu<G, F, I> as FusionBackend>::Handle,
shape: Shape<D>
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn bool_tensor<const D: usize>( handle: <Wgpu<G, F, I> as FusionBackend>::Handle, shape: Shape<D> ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Convert a handle to a bool tensor.
source§fn float_tensor_handle<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
) -> <Wgpu<G, F, I> as FusionBackend>::Handle
fn float_tensor_handle<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D> ) -> <Wgpu<G, F, I> as FusionBackend>::Handle
Convert a float tensor to a handle.
source§fn int_tensor_handle<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
) -> <Wgpu<G, F, I> as FusionBackend>::Handle
fn int_tensor_handle<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D> ) -> <Wgpu<G, F, I> as FusionBackend>::Handle
Convert an int tensor to a handle.
source§fn bool_tensor_handle<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
) -> <Wgpu<G, F, I> as FusionBackend>::Handle
fn bool_tensor_handle<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D> ) -> <Wgpu<G, F, I> as FusionBackend>::Handle
Convert a bool tensor to a handle.
source§impl<G, F, I> IntTensorOps<Wgpu<G, F, I>> for Wgpu<G, F, I>
impl<G, F, I> IntTensorOps<Wgpu<G, F, I>> for Wgpu<G, F, I>
source§fn int_empty<const D: usize>(
shape: Shape<D>,
device: &<Wgpu<G, F, I> as Backend>::Device
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_empty<const D: usize>( shape: Shape<D>, device: &<Wgpu<G, F, I> as Backend>::Device ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Creates a new int tensor. Read more
source§fn int_shape<const D: usize>(
tensor: &<Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
) -> Shape<D>
fn int_shape<const D: usize>( tensor: &<Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D> ) -> Shape<D>
Returns the shape of the tensor. Read more
source§fn int_into_data<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
) -> Reader<Data<I, D>>
fn int_into_data<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D> ) -> Reader<Data<I, D>>
Converts the tensor to a data structure. Read more
source§fn int_from_data<const D: usize>(
data: Data<I, D>,
device: &<Wgpu<G, F, I> as Backend>::Device
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_from_data<const D: usize>( data: Data<I, D>, device: &<Wgpu<G, F, I> as Backend>::Device ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Creates a tensor from the data structure. Read more
source§fn int_device<const D: usize>(
tensor: &<Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::Device
fn int_device<const D: usize>( tensor: &<Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::Device
Gets the device of the tensor. Read more
source§fn int_to_device<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
device: &<Wgpu<G, F, I> as Backend>::Device
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_to_device<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, device: &<Wgpu<G, F, I> as Backend>::Device ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Moves the tensor to the given device.
source§fn int_reshape<const D1: usize, const D2: usize>(
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D1>,
shape: Shape<D2>
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D2>
fn int_reshape<const D1: usize, const D2: usize>( tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D1>, shape: Shape<D2> ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D2>
Reshapes the tensor. Read more
source§fn int_slice<const D1: usize, const D2: usize>(
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D1>,
ranges: [Range<usize>; D2]
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D1>
fn int_slice<const D1: usize, const D2: usize>( tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D1>, ranges: [Range<usize>; D2] ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D1>
Gets the element at the given indices. Read more
source§fn int_slice_assign<const D1: usize, const D2: usize>(
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D1>,
ranges: [Range<usize>; D2],
value: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D1>
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D1>
fn int_slice_assign<const D1: usize, const D2: usize>( tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D1>, ranges: [Range<usize>; D2], value: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D1> ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D1>
Sets the element at the given indices. Read more
source§fn int_mask_where<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
mask: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>,
value: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_mask_where<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, mask: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>, value: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Fills the tensor with values from the source tensor if the mask is true at the given
indices. Read more
source§fn int_mask_fill<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
mask: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>,
value: <Wgpu<G, F, I> as Backend>::IntElem
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_mask_fill<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, mask: <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>, value: <Wgpu<G, F, I> as Backend>::IntElem ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Fills the tensor with the given value if the mask is true at the given indices. Read more
source§fn int_gather<const D: usize>(
dim: usize,
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
indices: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_gather<const D: usize>( dim: usize, tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, indices: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Gather elements from the tensor at the given indices. Read more
source§fn int_scatter<const D: usize>(
dim: usize,
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
indices: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
value: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_scatter<const D: usize>( dim: usize, tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, indices: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, value: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Scatter a given value to the tensor at the given indices. Read more
source§fn int_select<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
dim: usize,
indices: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<1>
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_select<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, dim: usize, indices: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<1> ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Select tensor elements along the given dimension corresponding to the given indices. Read more
source§fn int_select_assign<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
dim: usize,
indices: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<1>,
value: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_select_assign<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, dim: usize, indices: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<1>, value: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Assign the selected elements along the given dimension corresponding to the given indices
to the given value. Read more
source§fn int_cat<const D: usize>(
tensors: Vec<<Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>>,
dim: usize
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_cat<const D: usize>( tensors: Vec<<Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>>, dim: usize ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Concatenates the given tensors along the given dimension. Read more
source§fn int_equal<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn int_equal<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Elementwise equality comparison. Read more
source§fn int_equal_elem<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::IntElem
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn int_equal_elem<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::IntElem ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Elementwise equality comparison with a scalar. Read more
source§fn int_greater<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn int_greater<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Elementwise greater than comparison. Read more
source§fn int_greater_elem<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::IntElem
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn int_greater_elem<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::IntElem ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Elementwise greater than comparison with a scalar. Read more
source§fn int_greater_equal<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn int_greater_equal<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Elementwise greater than or equal comparison. Read more
source§fn int_greater_equal_elem<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::IntElem
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn int_greater_equal_elem<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::IntElem ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Elementwise greater than or equal comparison with a scalar. Read more
source§fn int_lower<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn int_lower<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Elementwise less than comparison. Read more
source§fn int_lower_elem<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::IntElem
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn int_lower_elem<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::IntElem ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Elementwise less than comparison with a scalar. Read more
source§fn int_lower_equal<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn int_lower_equal<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Elementwise less than or equal comparison. Read more
source§fn int_lower_equal_elem<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::IntElem
) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
fn int_lower_equal_elem<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::IntElem ) -> <Wgpu<G, F, I> as Backend>::BoolTensorPrimitive<D>
Elementwise less than or equal comparison with a scalar. Read more
source§fn int_add<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_add<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Elementwise addition. Read more
source§fn int_add_scalar<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::IntElem
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_add_scalar<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::IntElem ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Elementwise addition with a scalar. Read more
source§fn int_sub<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_sub<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Elementwise subtraction. Read more
source§fn int_sub_scalar<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::IntElem
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_sub_scalar<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::IntElem ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Elementwise subtraction with a scalar. Read more
source§fn int_mul<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_mul<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Elementwise multiplication. Read more
source§fn int_mul_scalar<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::IntElem
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_mul_scalar<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::IntElem ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Elementwise multiplication with a scalar. Read more
source§fn int_div<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_div<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Elementwise division. Read more
source§fn int_div_scalar<const D: usize>(
lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
rhs: <Wgpu<G, F, I> as Backend>::IntElem
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_div_scalar<const D: usize>( lhs: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, rhs: <Wgpu<G, F, I> as Backend>::IntElem ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Elementwise division with a scalar. Read more
source§fn int_zeros<const D: usize>(
shape: Shape<D>,
device: &<Wgpu<G, F, I> as Backend>::Device
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_zeros<const D: usize>( shape: Shape<D>, device: &<Wgpu<G, F, I> as Backend>::Device ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Creates a tensor of zeros. Read more
source§fn int_ones<const D: usize>(
shape: Shape<D>,
device: &<Wgpu<G, F, I> as Backend>::Device
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_ones<const D: usize>( shape: Shape<D>, device: &<Wgpu<G, F, I> as Backend>::Device ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Creates a tensor of ones. Read more
source§fn int_sum<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<1>
fn int_sum<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<1>
Sums all elements in the tensor. Read more
source§fn int_sum_dim<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
dim: usize
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_sum_dim<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, dim: usize ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Sums all elements in the tensor along a dimension. Read more
source§fn int_mean_dim<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
dim: usize
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_mean_dim<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, dim: usize ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Computes the mean of all elements in the tensor along a dimension. Read more
source§fn int_argmax<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
dim: usize
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_argmax<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, dim: usize ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Gets the indices of the maximum elements along a dimension. Read more
source§fn int_argmin<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
dim: usize
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_argmin<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, dim: usize ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Gets the indices of the minimum elements along a dimension. Read more
source§fn int_clamp<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
min: <Wgpu<G, F, I> as Backend>::IntElem,
max: <Wgpu<G, F, I> as Backend>::IntElem
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_clamp<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, min: <Wgpu<G, F, I> as Backend>::IntElem, max: <Wgpu<G, F, I> as Backend>::IntElem ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Clamps a tensor between a minimum and maximum value. Read more
source§fn int_abs<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_abs<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Returns a new tensor with absolute values. Read more
source§fn int_into_float<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
fn int_into_float<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<D>
Converts int tensor to float tensor. Read more
source§fn int_swap_dims<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
dim1: usize,
dim2: usize
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_swap_dims<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, dim1: usize, dim2: usize ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Swaps two dimensions of an int tensor. Read more
source§fn int_repeat<const D: usize>(
tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>,
dim: usize,
times: usize
) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
fn int_repeat<const D: usize>( tensor: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>, dim: usize, times: usize ) -> <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<D>
Repeats the tensor along the given dimension the given number of times. Read more
source§fn int_to_data<const D: usize>(
tensor: &<B as Backend>::IntTensorPrimitive<D>
) -> Reader<Data<<B as Backend>::IntElem, D>>
fn int_to_data<const D: usize>( tensor: &<B as Backend>::IntTensorPrimitive<D> ) -> Reader<Data<<B as Backend>::IntElem, D>>
Gets the data from the tensor. Read more
source§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>
Elementwise power with a IntTensor. Read more
source§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>
Elementwise power with a floatTensor. Read more
source§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>
Elementwise power with a scalar. Read more
source§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>
Elementwise power with a floatTensor. Read more
source§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>
Clamps a tensor under a minimum value. Read more
source§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>
Clamps a tensor over a maximum value. Read more
source§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>
Elementwise negation. Read more
source§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>
Creates a tensor filled with given value. Read more
source§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>
Computes the mean of all elements in the tensor. Read more
source§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>
Gets the maximum element in the tensor. Read more
source§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>
Gets the maximum element in the tensor along a dimension. Read more
source§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>)
Gets the maximum elements and corresponding indices along a dimension. Read more
source§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>
Gets the minimum element in the tensor. Read more
source§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>
Gets the minimum elements in the tensor along a dimension. Read more
source§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>)
Gets the minimum elements and corresponding indices along a dimension. Read more
source§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>
Transposes an int tensor. Read more
source§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. Read more
source§impl<G, F, I> ModuleOps<Wgpu<G, F, I>> for Wgpu<G, F, I>
impl<G, F, I> ModuleOps<Wgpu<G, F, I>> for Wgpu<G, F, I>
source§fn conv2d(
x: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>,
weight: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>,
bias: Option<<Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<1>>,
options: ConvOptions<2>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>
fn conv2d( x: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>, weight: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>, bias: Option<<Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<1>>, options: ConvOptions<2> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>
Two dimensional convolution. Read more
source§fn conv_transpose2d(
x: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>,
weight: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>,
bias: Option<<Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<1>>,
options: ConvTransposeOptions<2>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>
fn conv_transpose2d( x: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>, weight: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>, bias: Option<<Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<1>>, options: ConvTransposeOptions<2> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>
Two dimensional transposed convolution. Read more
source§fn avg_pool2d(
x: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
count_include_pad: bool
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>
fn avg_pool2d( x: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], count_include_pad: bool ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>
Two dimensional avg pooling. Read more
source§fn avg_pool2d_backward(
x: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>,
grad: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
count_include_pad: bool
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>
fn avg_pool2d_backward( x: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>, grad: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], count_include_pad: bool ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>
Backward pass for the avg pooling 2d operation.
source§fn max_pool2d(
x: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
dilation: [usize; 2]
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>
fn max_pool2d( x: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], dilation: [usize; 2] ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>
Two dimensional max pooling. Read more
source§fn max_pool2d_with_indices(
x: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
dilation: [usize; 2]
) -> MaxPool2dWithIndices<Wgpu<G, F, I>>
fn max_pool2d_with_indices( x: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], dilation: [usize; 2] ) -> MaxPool2dWithIndices<Wgpu<G, F, I>>
Two dimensional max pooling with indices. Read more
source§fn max_pool2d_with_indices_backward(
x: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
dilation: [usize; 2],
output_grad: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>,
indices: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<4>
) -> MaxPool2dBackward<Wgpu<G, F, I>>
fn max_pool2d_with_indices_backward( x: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], dilation: [usize; 2], output_grad: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>, indices: <Wgpu<G, F, I> as Backend>::IntTensorPrimitive<4> ) -> MaxPool2dBackward<Wgpu<G, F, I>>
Backward pass for the max pooling 2d operation.
source§fn adaptive_avg_pool2d(
x: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>,
output_size: [usize; 2]
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>
fn adaptive_avg_pool2d( x: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>, output_size: [usize; 2] ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>
Two dimensional adaptive avg pooling. Read more
source§fn adaptive_avg_pool2d_backward(
x: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>,
grad: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>
) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>
fn adaptive_avg_pool2d_backward( x: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>, grad: <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4> ) -> <Wgpu<G, F, I> as Backend>::FloatTensorPrimitive<4>
Backward pass for the adaptive avg pooling 2d operation.
source§fn embedding(
weights: <B as Backend>::FloatTensorPrimitive<2>,
indices: <B as Backend>::IntTensorPrimitive<2>
) -> <B as Backend>::FloatTensorPrimitive<3>
fn embedding( weights: <B as Backend>::FloatTensorPrimitive<2>, indices: <B as Backend>::IntTensorPrimitive<2> ) -> <B as Backend>::FloatTensorPrimitive<3>
Embedding operation. Read more
source§fn embedding_backward(
weights: <B as Backend>::FloatTensorPrimitive<2>,
output_grad: <B as Backend>::FloatTensorPrimitive<3>,
indices: <B as Backend>::IntTensorPrimitive<2>
) -> <B as Backend>::FloatTensorPrimitive<2>
fn embedding_backward( weights: <B as Backend>::FloatTensorPrimitive<2>, output_grad: <B as Backend>::FloatTensorPrimitive<3>, indices: <B as Backend>::IntTensorPrimitive<2> ) -> <B as Backend>::FloatTensorPrimitive<2>
Embedding backward operation. Read more
source§fn conv1d(
x: <B as Backend>::FloatTensorPrimitive<3>,
weight: <B as Backend>::FloatTensorPrimitive<3>,
bias: Option<<B as Backend>::FloatTensorPrimitive<1>>,
options: ConvOptions<1>
) -> <B as Backend>::FloatTensorPrimitive<3>
fn conv1d( x: <B as Backend>::FloatTensorPrimitive<3>, weight: <B as Backend>::FloatTensorPrimitive<3>, bias: Option<<B as Backend>::FloatTensorPrimitive<1>>, options: ConvOptions<1> ) -> <B as Backend>::FloatTensorPrimitive<3>
One dimensional convolution. Read more
source§fn conv1d_backward(
x: <B as Backend>::FloatTensorPrimitive<3>,
weight: <B as Backend>::FloatTensorPrimitive<3>,
bias: Option<<B as Backend>::FloatTensorPrimitive<1>>,
output_grad: <B as Backend>::FloatTensorPrimitive<3>,
options: ConvOptions<1>
) -> Conv1dBackward<B>
fn conv1d_backward( x: <B as Backend>::FloatTensorPrimitive<3>, weight: <B as Backend>::FloatTensorPrimitive<3>, bias: Option<<B as Backend>::FloatTensorPrimitive<1>>, output_grad: <B as Backend>::FloatTensorPrimitive<3>, options: ConvOptions<1> ) -> Conv1dBackward<B>
Backward pass for the conv1d operation.
source§fn conv2d_backward(
x: <B as Backend>::FloatTensorPrimitive<4>,
weight: <B as Backend>::FloatTensorPrimitive<4>,
bias: Option<<B as Backend>::FloatTensorPrimitive<1>>,
output_grad: <B as Backend>::FloatTensorPrimitive<4>,
options: ConvOptions<2>
) -> Conv2dBackward<B>
fn conv2d_backward( x: <B as Backend>::FloatTensorPrimitive<4>, weight: <B as Backend>::FloatTensorPrimitive<4>, bias: Option<<B as Backend>::FloatTensorPrimitive<1>>, output_grad: <B as Backend>::FloatTensorPrimitive<4>, options: ConvOptions<2> ) -> Conv2dBackward<B>
Backward pass for the conv2d operation.
source§fn conv_transpose1d(
x: <B as Backend>::FloatTensorPrimitive<3>,
weight: <B as Backend>::FloatTensorPrimitive<3>,
bias: Option<<B as Backend>::FloatTensorPrimitive<1>>,
options: ConvTransposeOptions<1>
) -> <B as Backend>::FloatTensorPrimitive<3>
fn conv_transpose1d( x: <B as Backend>::FloatTensorPrimitive<3>, weight: <B as Backend>::FloatTensorPrimitive<3>, bias: Option<<B as Backend>::FloatTensorPrimitive<1>>, options: ConvTransposeOptions<1> ) -> <B as Backend>::FloatTensorPrimitive<3>
One dimensional transposed convolution. Read more
source§fn conv_transpose1d_backward(
x: <B as Backend>::FloatTensorPrimitive<3>,
weight: <B as Backend>::FloatTensorPrimitive<3>,
bias: Option<<B as Backend>::FloatTensorPrimitive<1>>,
output_grad: <B as Backend>::FloatTensorPrimitive<3>,
options: ConvTransposeOptions<1>
) -> Conv1dBackward<B>
fn conv_transpose1d_backward( x: <B as Backend>::FloatTensorPrimitive<3>, weight: <B as Backend>::FloatTensorPrimitive<3>, bias: Option<<B as Backend>::FloatTensorPrimitive<1>>, output_grad: <B as Backend>::FloatTensorPrimitive<3>, options: ConvTransposeOptions<1> ) -> Conv1dBackward<B>
Backward pass for the conv transpose 1d operation.
source§fn conv_transpose2d_backward(
x: <B as Backend>::FloatTensorPrimitive<4>,
weight: <B as Backend>::FloatTensorPrimitive<4>,
bias: Option<<B as Backend>::FloatTensorPrimitive<1>>,
output_grad: <B as Backend>::FloatTensorPrimitive<4>,
options: ConvTransposeOptions<2>
) -> Conv2dBackward<B>
fn conv_transpose2d_backward( x: <B as Backend>::FloatTensorPrimitive<4>, weight: <B as Backend>::FloatTensorPrimitive<4>, bias: Option<<B as Backend>::FloatTensorPrimitive<1>>, output_grad: <B as Backend>::FloatTensorPrimitive<4>, options: ConvTransposeOptions<2> ) -> Conv2dBackward<B>
Backward pass for the conv transpose 2d operation.
source§fn unfold4d(
x: <B as Backend>::FloatTensorPrimitive<4>,
kernel_size: [usize; 2],
options: UnfoldOptions
) -> <B as Backend>::FloatTensorPrimitive<3>
fn unfold4d( x: <B as Backend>::FloatTensorPrimitive<4>, kernel_size: [usize; 2], options: UnfoldOptions ) -> <B as Backend>::FloatTensorPrimitive<3>
Four-dimensional unfolding. Read more
source§fn avg_pool1d(
x: <B as Backend>::FloatTensorPrimitive<3>,
kernel_size: usize,
stride: usize,
padding: usize,
count_include_pad: bool
) -> <B as Backend>::FloatTensorPrimitive<3>
fn avg_pool1d( x: <B as Backend>::FloatTensorPrimitive<3>, kernel_size: usize, stride: usize, padding: usize, count_include_pad: bool ) -> <B as Backend>::FloatTensorPrimitive<3>
One dimensional avg pooling. Read more
source§fn avg_pool1d_backward(
x: <B as Backend>::FloatTensorPrimitive<3>,
grad: <B as Backend>::FloatTensorPrimitive<3>,
kernel_size: usize,
stride: usize,
padding: usize,
count_include_pad: bool
) -> <B as Backend>::FloatTensorPrimitive<3>
fn avg_pool1d_backward( x: <B as Backend>::FloatTensorPrimitive<3>, grad: <B as Backend>::FloatTensorPrimitive<3>, kernel_size: usize, stride: usize, padding: usize, count_include_pad: bool ) -> <B as Backend>::FloatTensorPrimitive<3>
Backward pass for the avg pooling 1d operation.
source§fn adaptive_avg_pool1d(
x: <B as Backend>::FloatTensorPrimitive<3>,
output_size: usize
) -> <B as Backend>::FloatTensorPrimitive<3>
fn adaptive_avg_pool1d( x: <B as Backend>::FloatTensorPrimitive<3>, output_size: usize ) -> <B as Backend>::FloatTensorPrimitive<3>
One dimensional adaptive avg pooling. Read more
source§fn adaptive_avg_pool1d_backward(
x: <B as Backend>::FloatTensorPrimitive<3>,
grad: <B as Backend>::FloatTensorPrimitive<3>
) -> <B as Backend>::FloatTensorPrimitive<3>
fn adaptive_avg_pool1d_backward( x: <B as Backend>::FloatTensorPrimitive<3>, grad: <B as Backend>::FloatTensorPrimitive<3> ) -> <B as Backend>::FloatTensorPrimitive<3>
Backward pass for the adaptive avg pooling 1d operation.
source§fn max_pool1d(
x: <B as Backend>::FloatTensorPrimitive<3>,
kernel_size: usize,
stride: usize,
padding: usize,
dilation: usize
) -> <B as Backend>::FloatTensorPrimitive<3>
fn max_pool1d( x: <B as Backend>::FloatTensorPrimitive<3>, kernel_size: usize, stride: usize, padding: usize, dilation: usize ) -> <B as Backend>::FloatTensorPrimitive<3>
One dimensional max pooling. Read more
source§fn max_pool1d_with_indices(
x: <B as Backend>::FloatTensorPrimitive<3>,
kernel_size: usize,
stride: usize,
padding: usize,
dilation: usize
) -> MaxPool1dWithIndices<B>
fn max_pool1d_with_indices( x: <B as Backend>::FloatTensorPrimitive<3>, kernel_size: usize, stride: usize, padding: usize, dilation: usize ) -> MaxPool1dWithIndices<B>
One dimensional max pooling with indices. Read more
source§fn max_pool1d_with_indices_backward(
x: <B as Backend>::FloatTensorPrimitive<3>,
kernel_size: usize,
stride: usize,
padding: usize,
dilation: usize,
output_grad: <B as Backend>::FloatTensorPrimitive<3>,
indices: <B as Backend>::IntTensorPrimitive<3>
) -> MaxPool1dBackward<B>
fn max_pool1d_with_indices_backward( x: <B as Backend>::FloatTensorPrimitive<3>, kernel_size: usize, stride: usize, padding: usize, dilation: usize, output_grad: <B as Backend>::FloatTensorPrimitive<3>, indices: <B as Backend>::IntTensorPrimitive<3> ) -> MaxPool1dBackward<B>
Backward pass for the max pooling 1d operation.
Auto Trait Implementations§
impl<G, F, I> RefUnwindSafe for Wgpu<G, F, I>
impl<G, F, I> Send for Wgpu<G, F, I>
impl<G, F, I> Sync for Wgpu<G, F, I>
impl<G, F, I> Unpin for Wgpu<G, F, I>
impl<G, F, I> UnwindSafe for Wgpu<G, F, I>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more