pub struct Relu {}
Trait Implementations§
Source§impl ReadOp for Relu
impl ReadOp for Relu
Source§fn read(
_op: &OperatorNode<'_>,
_ctx: &dyn OpLoadContext,
) -> Result<Self, ReadOpError>
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,
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 moreAuto 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> 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<Op> Operator for Op
impl<Op> Operator for Op
Source§fn run(
&self,
pool: &TensorPool,
inputs: InputList<'_>,
) -> Result<SmallVec<[Output; 1]>, OpError>
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
fn can_run_in_place(&self) -> bool
Return true if this operator supports in-place execution via
run_in_place
. Read moreSource§fn run_in_place(
&self,
_pool: &TensorPool,
input: Output,
_: InputList<'_>,
) -> Result<Output, OpError>
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
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
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
fn has_subgraph(&self) -> bool
Return true if this operator executes a subgraph.
Source§fn subgraphs(&self) -> SmallVec<[&Graph; 2]>
fn subgraphs(&self) -> SmallVec<[&Graph; 2]>
Return a list of subgraphs used by this operator.
Source§fn prepack_inputs(&self) -> SmallVec<[usize; 1]>
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>
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>
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