[][src]Trait tract_hir::prelude::ModelDslConst

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

Extension to add constants to model that tolerates them.

Required methods

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

Add a constant node to the graph.

Loading content...

Implementors

impl<F, O> ModelDslConst for ModelImpl<F, O> where
    F: 'static + Fact + Clone + From<Arc<Tensor>> + Hash,
    O: Debug + Display + From<Const> + AsRef<dyn Op + 'static> + AsMut<dyn Op + 'static> + Clone + Hash + 'static, 
[src]

Loading content...