Type Alias tract_tensorflow::prelude::TypedModelPatch
source · pub type TypedModelPatch = ModelPatch<TypedFact, Box<dyn TypedOp>>;
Expand description
A ModelPatch for TypedModel.
Aliased Type§
struct TypedModelPatch {
pub context: Vec<String>,
pub dont_apply_twice: Option<String>,
pub model: Graph<TypedFact, Box<dyn TypedOp>>,
pub inputs: HashMap<usize, usize>,
pub taps: HashMap<OutletId, OutletId>,
pub shunts: HashMap<OutletId, OutletId>,
pub obliterate: Vec<usize>,
}
Fields§
§context: Vec<String>
patch label for auditing and debugging
dont_apply_twice: Option<String>
optimizer will ignore this patch in node to node loop if it was already encountered
model: Graph<TypedFact, Box<dyn TypedOp>>
the model-like ‘patch’ of nodes to add to the model
inputs: HashMap<usize, usize>
map of replaced inputs (patch node id to model node id)
taps: HashMap<OutletId, OutletId>
map of patch inputs to model wires
shunts: HashMap<OutletId, OutletId>
map of old model wires to be replaced by wires from the patch
obliterate: Vec<usize>
operations to discard from the model