Struct Relu

Source
pub struct Relu {}

Trait Implementations§

Source§

impl Debug for Relu

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl ReadOp for Relu

Source§

fn op_type() -> OperatorType

Return the type enum value for this operator.
Source§

fn read( _op: &OperatorNode<'_>, _ctx: &dyn OpLoadContext, ) -> Result<Self, ReadOpError>

Deserialize an operator. Read more
Source§

fn read_boxed( op: &OperatorNode<'_>, ctx: &dyn OpLoadContext, ) -> Result<Box<dyn Operator + Send + Sync>, ReadOpError>
where Self: 'static,

Deserialize an operator and box it into a Box<dyn Operator>. Read more

Auto Trait Implementations§

§

impl Freeze for Relu

§

impl RefUnwindSafe for Relu

§

impl Send for Relu

§

impl Sync for Relu

§

impl Unpin for Relu

§

impl UnwindSafe for Relu

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<Op> Operator for Op
where Op: Any + Debug + UnaryFloatOp,

Source§

fn name(&self) -> &str

Return a display name for the operator.
Source§

fn run( &self, pool: &TensorPool, inputs: InputList<'_>, ) -> Result<SmallVec<[Output; 1]>, OpError>

Execute the operator with the given inputs. Read more
Source§

fn can_run_in_place(&self) -> bool

Return true if this operator supports in-place execution via run_in_place. Read more
Source§

fn run_in_place( &self, _pool: &TensorPool, input: Output, _: InputList<'_>, ) -> Result<Output, OpError>

Execute this operator in-place on an existing tensor. Read more
Source§

fn is_commutative(&self) -> bool

Return true if this operator is commutative, meaning that its inputs can be re-ordered without affecting the result. Read more
Source§

fn is_deterministic(&self) -> bool

Return true if this operator’s outputs depend only on its inputs. Read more
Source§

fn has_subgraph(&self) -> bool

Return true if this operator executes a subgraph.
Source§

fn subgraphs(&self) -> SmallVec<[&Graph; 2]>

Return a list of subgraphs used by this operator.
Source§

fn prepack_inputs(&self) -> SmallVec<[usize; 1]>

Return the IDs of inputs which can be pre-packed using prepack.
Source§

fn prepack(&self, index: usize, input: Input<'_>) -> Option<PrepackedInput>

Pre-pack an input for more efficient inference later. Read more
Source§

fn run_subgraph( &self, pool: &TensorPool, input: InputList<'_>, captures: CaptureEnv<'_>, weight_cache: Option<&[WeightCache]>, run_opts: Option<RunOptions>, ) -> Result<OutputList, RunError>

Execute the operator with the given inputs and captured values. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.