[][src]Trait tract_core::model::ModelDslConst

pub trait ModelDslConst {
    fn add_const(
        &mut self,
        name: impl Into<String>,
        v: impl IntoArcTensor
    ) -> TractResult<OutletId>; }

Extension to add constants to model that tolerates them.

Required methods

fn add_const(
    &mut self,
    name: impl Into<String>,
    v: impl IntoArcTensor
) -> TractResult<OutletId>

Add a constant node to the graph.

Loading content...

Implementors

impl<TI: Fact + Clone + 'static, O, E> ModelDslConst for ModelImpl<TI, O> where
    TractError: From<E>,
    TI: Fact + Clone + 'static + TryFrom<InferenceFact, Error = E>,
    O: Debug + Display + From<Const> + AsRef<dyn Op> + AsMut<dyn Op> + Clone + 'static, 
[src]

Loading content...