Struct tract_hir::prelude::TypedFact [−][src]
Fully determined tensor information for TypedModel.
Fields
datum_type: DatumType
tensor element type
shape: ShapeFact
tensor shape
konst: Option<Arc<Tensor>>
optional constant value
uniform: Option<Arc<Tensor>>
optional uniform value
Implementations
impl TypedFact
[src]
pub fn scalar<T>() -> TypedFact where
T: Datum,
[src]
T: Datum,
pub fn shape<T, S>(shape: S) -> TypedFact where
S: Into<ShapeFact>,
T: Datum,
[src]
S: Into<ShapeFact>,
T: Datum,
pub fn dt_scalar(datum_type: DatumType) -> TypedFact
[src]
pub fn dt_shape<S>(datum_type: DatumType, shape: S) -> TypedFact where
S: Into<ShapeFact>,
[src]
S: Into<ShapeFact>,
pub fn rank(&self) -> usize
[src]
pub fn format_dt_shape(&self) -> String
[src]
pub fn consistent(&self) -> Result<(), Error>
[src]
pub fn without_value(&self) -> TypedFact
[src]
Trait Implementations
impl Clone for TypedFact
[src]
impl Debug for TypedFact
[src]
impl DynHash for TypedFact
[src]
impl Fact for TypedFact
[src]
pub fn to_typed_fact(&self) -> Result<TypedFact, Error>
[src]
pub fn matches(&self, t: &Tensor) -> Result<bool, Error>
[src]
pub fn same_as(&self, other: &(dyn Fact + 'static)) -> bool
[src]
pub fn compatible_with(&self, other: &(dyn Fact + 'static)) -> bool
[src]
impl<'a> From<&'a TypedFact> for TypedFact
[src]
impl<'a> From<&'a TypedFact> for InferenceFact
[src]
fn from(t: &'a TypedFact) -> InferenceFact
[src]
impl<'t> From<&'t Tensor> for TypedFact
[src]
impl From<Arc<Tensor>> for TypedFact
[src]
impl From<Tensor> for TypedFact
[src]
impl Hash for TypedFact
[src]
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<TypedFact> for TypedFact
[src]
impl SpecialOps<TypedFact, Box<dyn TypedOp + 'static, Global>> for Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>
[src]
pub fn is_source(op: &Box<dyn TypedOp + 'static, Global>) -> bool
[src]
pub fn create_dummy(&self) -> Box<dyn TypedOp + 'static, Global>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
[src]
Notable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
pub fn create_source(
&self,
fact: TypedFact
) -> Box<dyn TypedOp + 'static, Global>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
[src]
&self,
fact: TypedFact
) -> Box<dyn TypedOp + 'static, Global>ⓘ
Notable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
pub fn wire_node(
&mut self,
name: impl Into<String>,
op: impl Into<Box<dyn TypedOp + 'static, Global>>,
inputs: &[OutletId]
) -> Result<SmallVec<[OutletId; 4]>, Error>
[src]
&mut self,
name: impl Into<String>,
op: impl Into<Box<dyn TypedOp + 'static, Global>>,
inputs: &[OutletId]
) -> Result<SmallVec<[OutletId; 4]>, Error>
impl StructuralPartialEq for TypedFact
[src]
impl Translate<TypedFact, Box<dyn TypedOp + 'static, Global>, TypedFact, Box<dyn TypedOp + 'static, Global>> for SymbolValues
[src]
pub fn translate_node(
&self,
source: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
target: &mut Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
mapping: &HashMap<OutletId, OutletId, RandomState>
) -> Result<SmallVec<[OutletId; 4]>, Error>
[src]
&self,
source: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
target: &mut Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
mapping: &HashMap<OutletId, OutletId, RandomState>
) -> Result<SmallVec<[OutletId; 4]>, Error>
pub fn translate_model(
&self,
source: &Graph<TI1, O1>
) -> Result<Graph<TI2, O2>, Error>
[src]
&self,
source: &Graph<TI1, O1>
) -> Result<Graph<TI2, O2>, Error>
pub fn translate_model_with_mappings(
&self,
source: &Graph<TI1, O1>
) -> Result<(Graph<TI2, O2>, HashMap<OutletId, OutletId, RandomState>), Error>
[src]
&self,
source: &Graph<TI1, O1>
) -> Result<(Graph<TI2, O2>, HashMap<OutletId, OutletId, RandomState>), Error>
impl<'a> TryFrom<&'a InferenceFact> for TypedFact
[src]
type Error = TractError
The type returned in the event of a conversion error.
fn try_from(fact: &InferenceFact) -> TractResult<TypedFact>
[src]
Auto Trait Implementations
impl RefUnwindSafe for TypedFact
impl Send for TypedFact
impl Sync for TypedFact
impl Unpin for TypedFact
impl UnwindSafe for TypedFact
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow(&self) -> &TⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut TⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
Notable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Any + Send + Sync,
T: Any + Send + Sync,
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
pub fn __clone_box(&self, Private) -> *mut ()
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,