Struct tract_pulse::internal::IntoAst[]

pub struct IntoAst<'a> {
    pub framework: &'a Nnef,
    pub parent: Option<&'a IntoAst<'a>>,
    pub registries: Vec<String, Global>,
    pub prefix: Option<String>,
    pub model: &'a Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    pub parameters: Vec<String, Global>,
    pub results: Vec<String, Global>,
    pub mapping: HashMap<OutletId, Arc<RValue>, RandomState>,
    pub tensors: Vec<(String, Arc<Tensor>), Global>,
    pub fragments: HashMap<String, FragmentDef, RandomState>,
    pub body: Vec<Assignment, Global>,
}

Fields

framework: &'a Nnefparent: Option<&'a IntoAst<'a>>registries: Vec<String, Global>prefix: Option<String>model: &'a Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>parameters: Vec<String, Global>results: Vec<String, Global>mapping: HashMap<OutletId, Arc<RValue>, RandomState>tensors: Vec<(String, Arc<Tensor>), Global>fragments: HashMap<String, FragmentDef, RandomState>body: Vec<Assignment, Global>

Implementations

impl<'a> IntoAst<'a>

pub fn new(
    framework: &'a Nnef,
    model: &'a Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> IntoAst<'a>

pub fn into_fragment(
    self
) -> Result<(FragmentDef, Vec<RequiredTensorParameter, Global>), Error>

pub fn into_proto_model(self) -> Result<ProtoModel, Error>

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

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

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

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

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

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> Downcast for T where
    T: Any
[src]

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

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

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

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.