Meaning of Scan
node's input_mapping
and output_mapping
parameters
#1148
alexander-camuto
started this conversation in
General
Replies: 1 comment 6 replies
-
#[derive(Clone, new, Hash, Default)]
pub struct OutputMapping<F: Clone> {
pub scan: Option<(usize, ScanInfo)>,
pub full_dim_hint: Option<F>,
pub last_value_slot: Option<usize>,
pub state: bool,
} output_amppings is a table that must exactly as many output_mapping as the body model has outputs. It is mapped 1-to-1.
|
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Me again 😬.
I've been using
Scan
of late as it is particularly helpful for processing recursive models like LSTMs. However I've been struggling a bit to understand how to process the outputs of aScan
node.Essentially the node is itself a (sub)-Graph embedded within a larger graph (the model). But say the
Scan
sub-graph hasN
explicitly definedOutput
nodes, theScan
node itself may haveM
outlets. WhereM =/= N
. My suspicion is that the information for going from the N output nodes to the M outlets is contained within theoutput_mapping
field, but I don't have a good grasp as toany help would be appreciated :)
Beta Was this translation helpful? Give feedback.
All reactions