Struct tract_nnef::ser::IntoAst[][src]

pub struct IntoAst<'a> {
    pub framework: &'a Nnef,
    pub parent: Option<&'a IntoAst<'a>>,
    pub registries: Vec<String>,
    pub prefix: Option<String>,
    pub model: &'a TypedModel,
    pub parameters: Vec<String>,
    pub results: Vec<String>,
    pub mapping: HashMap<OutletId, Arc<RValue>>,
    pub tensors: Vec<(String, Arc<Tensor>)>,
    pub fragments: HashMap<String, FragmentDef>,
    pub body: Vec<Assignment>,
}

Fields

framework: &'a Nnefparent: Option<&'a IntoAst<'a>>registries: Vec<String>prefix: Option<String>model: &'a TypedModelparameters: Vec<String>results: Vec<String>mapping: HashMap<OutletId, Arc<RValue>>tensors: Vec<(String, Arc<Tensor>)>fragments: HashMap<String, FragmentDef>body: Vec<Assignment>

Implementations

impl<'a> IntoAst<'a>[src]

pub fn new(framework: &'a Nnef, model: &'a TypedModel) -> IntoAst<'a>[src]

pub fn into_fragment(
    self
) -> TractResult<(FragmentDef, Vec<RequiredTensorParameter>)>
[src]

pub fn into_proto_model(self) -> TractResult<ProtoModel>[src]

pub fn scoped_id(&self, name: impl Into<String>) -> String[src]

pub fn sanitize(name: impl Into<String>) -> String[src]

pub fn force_assign(
    &mut self,
    name: impl Into<String>,
    exp: &Arc<RValue>
) -> Arc<RValue>
[src]

pub fn konst(
    &mut self,
    name: impl Into<String>,
    tensor: &Arc<Tensor>
) -> Arc<RValue>
[src]

pub fn konst_variable(
    &mut self,
    name: impl Into<String>,
    tensor: &Arc<Tensor>
) -> Arc<RValue>
[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for IntoAst<'a>

impl<'a> Send for IntoAst<'a>

impl<'a> Sync for IntoAst<'a>

impl<'a> Unpin for IntoAst<'a>

impl<'a> !UnwindSafe for IntoAst<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Any + Send + Sync

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.