Struct tract_core::model::TypedFact [−][src]
pub struct TypedFact { pub datum_type: DatumType, pub shape: ShapeFact, pub konst: Option<Arc<Tensor>>, pub uniform: Option<Arc<Tensor>>, }
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
T: Datum,
S: Into<ShapeFact>,
[src]
T: Datum,
S: Into<ShapeFact>,
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) -> TractResult<()>
[src]
pub fn without_value(&self) -> Self
[src]
Trait Implementations
impl Clone for TypedFact
[src]
impl Debug for TypedFact
[src]
impl DynHash for TypedFact
[src]
impl Fact for TypedFact
[src]
fn to_typed_fact(&self) -> TractResult<TypedFact>
[src]
fn matches(&self, t: &Tensor) -> TractResult<bool>
[src]
fn same_as(&self, other: &dyn Fact) -> bool
[src]
fn compatible_with(&self, other: &dyn Fact) -> bool
[src]
impl<'a> From<&'a TypedFact> for TypedFact
[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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
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 TypedModel
[src]
fn is_source(op: &Box<dyn TypedOp>) -> bool
[src]
fn create_dummy(&self) -> Box<dyn TypedOp>ⓘ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<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[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<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
fn create_source(&self, fact: TypedFact) -> Box<dyn TypedOp>ⓘ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<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[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<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
fn wire_node(
&mut self,
name: impl Into<String>,
op: impl Into<Box<dyn TypedOp>>,
inputs: &[OutletId]
) -> TractResult<TVec<OutletId>>
[src]
&mut self,
name: impl Into<String>,
op: impl Into<Box<dyn TypedOp>>,
inputs: &[OutletId]
) -> TractResult<TVec<OutletId>>
impl StructuralPartialEq for TypedFact
[src]
impl Translate<TypedFact, Box<dyn TypedOp + 'static, Global>, TypedFact, Box<dyn TypedOp + 'static, Global>> for SymbolValues
[src]
fn translate_node(
&self,
source: &TypedModel,
node: &TypedNode,
target: &mut TypedModel,
mapping: &HashMap<OutletId, OutletId>
) -> TractResult<TVec<OutletId>>
[src]
&self,
source: &TypedModel,
node: &TypedNode,
target: &mut TypedModel,
mapping: &HashMap<OutletId, OutletId>
) -> TractResult<TVec<OutletId>>
fn translate_model(
&self,
source: &Graph<TI1, O1>
) -> TractResult<Graph<TI2, O2>>
[src]
&self,
source: &Graph<TI1, O1>
) -> TractResult<Graph<TI2, O2>>
fn translate_model_with_mappings(
&self,
source: &Graph<TI1, O1>
) -> TractResult<(Graph<TI2, O2>, HashMap<OutletId, OutletId>)>
[src]
&self,
source: &Graph<TI1, O1>
) -> TractResult<(Graph<TI2, O2>, HashMap<OutletId, OutletId>)>
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,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut Tⓘ
[src]
impl<T> Downcast for T where
T: Any,
[src]
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<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[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<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]
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>,