Skip to main content

RandomNormalLikeNodeBuilder

Struct RandomNormalLikeNodeBuilder 

Source
pub struct RandomNormalLikeNodeBuilder { /* private fields */ }

Implementations§

Source§

impl RandomNormalLikeNodeBuilder

Source

pub fn new(name: impl Into<String>) -> Self

Create a new builder

Source

pub fn input_tensor(self, name: &str, rank: usize, dtype: DType) -> Self

Add a tensor input (dynamic, no static shape)

Source

pub fn input_tensor_shape( self, name: &str, shape: Vec<usize>, dtype: DType, ) -> Self

Add a tensor input with fully-known static shape

Source

pub fn input_static_tensor_shape( self, name: &str, shape: Vec<usize>, dtype: DType, ) -> Self

Add a static tensor input with fully-known shape (not a forward parameter)

Source

pub fn input_scalar(self, name: &str, dtype: DType) -> Self

Add a scalar input (native Rust type, rank 0)

Source

pub fn input_scalar_tensor(self, name: &str, dtype: DType) -> Self

Add a scalar tensor input (1D tensor on device, rank 1)

Source

pub fn input_shape(self, name: &str, rank: usize) -> Self

Add a shape input with a specific rank (number of dimensions the shape describes)

For example, a 4D tensor shape [N, C, H, W] has rank 4.

Source

pub fn output_tensor(self, name: &str, rank: usize, dtype: DType) -> Self

Add an output tensor

Source

pub fn output_scalar(self, name: &str, dtype: DType) -> Self

Add a scalar output (native Rust type, rank 0)

Source

pub fn output_scalar_tensor(self, name: &str, dtype: DType) -> Self

Add a scalar tensor output (1D tensor on device, rank 1)

Source

pub fn output_shape(self, name: &str, rank: usize) -> Self

Add a shape output with a specific rank (number of dimensions the shape describes)

For example, a 4D tensor shape [N, C, H, W] has rank 4.

Source

pub fn input_const_i64(self, name: &str, value: i64) -> Self

Add a constant i64 scalar input with a known value

Source

pub fn config(self, config: RandomNormalLikeConfig) -> Self

Set the configuration

Source

pub fn build(self) -> RandomNormalLikeNode

Build the node

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.