pub struct SubgraphPattern {
pub name: String,
pub operations: Vec<String>,
pub replacement: String,
}Expand description
Represents a subgraph pattern to match
Fields§
§name: StringPattern name
operations: Vec<String>Sequence of operations in the pattern
replacement: StringReplacement operation
Implementations§
Source§impl SubgraphPattern
impl SubgraphPattern
Sourcepub fn new(name: String, operations: Vec<String>, replacement: String) -> Self
pub fn new(name: String, operations: Vec<String>, replacement: String) -> Self
Create a new pattern
Sourcepub fn linear_relu_fusion() -> Self
pub fn linear_relu_fusion() -> Self
Create a linear activation fusion pattern
Sourcepub fn conv_relu_fusion() -> Self
pub fn conv_relu_fusion() -> Self
Create a conv activation fusion pattern
Sourcepub fn conv_bn_fusion() -> Self
pub fn conv_bn_fusion() -> Self
Create a batch norm fusion pattern
Sourcepub fn conv_bn_relu_fusion() -> Self
pub fn conv_bn_relu_fusion() -> Self
Create a three-operation fusion pattern
Trait Implementations§
Source§impl Clone for SubgraphPattern
impl Clone for SubgraphPattern
Source§fn clone(&self) -> SubgraphPattern
fn clone(&self) -> SubgraphPattern
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SubgraphPattern
impl RefUnwindSafe for SubgraphPattern
impl Send for SubgraphPattern
impl Sync for SubgraphPattern
impl Unpin for SubgraphPattern
impl UnsafeUnpin for SubgraphPattern
impl UnwindSafe for SubgraphPattern
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more