[−][src]Trait tract_core::model::ModelDslConst
Extension to add constants to model that tolerates them.
Required methods
fn add_const(
&mut self,
name: impl Into<String>,
v: impl IntoArcTensor
) -> TractResult<usize>
&mut self,
name: impl Into<String>,
v: impl IntoArcTensor
) -> TractResult<usize>
Add a constant node to the graph.
fn plug_const(
&mut self,
inlet: InletId,
name: impl Into<String>,
v: impl IntoArcTensor
) -> TractResult<()>
&mut self,
inlet: InletId,
name: impl Into<String>,
v: impl IntoArcTensor
) -> TractResult<()>
Add a constant node to the graph and connect its output to inlet
.
Implementors
impl ModelDslConst for InferenceModel
[src]
fn add_const(
&mut self,
name: impl Into<String>,
v: impl IntoArcTensor
) -> TractResult<usize>
[src]
&mut self,
name: impl Into<String>,
v: impl IntoArcTensor
) -> TractResult<usize>
fn plug_const(
&mut self,
inlet: InletId,
name: impl Into<String>,
v: impl IntoArcTensor
) -> TractResult<()>
[src]
&mut self,
inlet: InletId,
name: impl Into<String>,
v: impl IntoArcTensor
) -> TractResult<()>
impl ModelDslConst for TypedModel
[src]
fn add_const(
&mut self,
name: impl Into<String>,
v: impl IntoArcTensor
) -> TractResult<usize>
[src]
&mut self,
name: impl Into<String>,
v: impl IntoArcTensor
) -> TractResult<usize>
fn plug_const(
&mut self,
inlet: InletId,
name: impl Into<String>,
v: impl IntoArcTensor
) -> TractResult<()>
[src]
&mut self,
inlet: InletId,
name: impl Into<String>,
v: impl IntoArcTensor
) -> TractResult<()>