Closed davidweichiang closed 2 months ago
@davidweichiang @ccshan
For edges that have multiple node labels, the corresponding weight result is a tensor in the following format:
For example:
EdgeLabel(name='Ctor[Succ/inst0 Folded/Nat/inst0]',
node_labels=(NodeLabel(name='Folded/Nat/inst0'), NodeLabel(name='Nat/inst0')),
is_terminal=True)
where
fgg.domains['Folded/Nat/inst0'].size() is 2
fgg.domains['Nat/inst0'].size() is 3
The shape of its weight is:
[2, 3]
For such weights, should the output look like below?
{
'folded/Nat/inst0/site0': {'Zero/inst0': 0,
'Succ/inst0 (folded/Nat/inst0/site0)': 1,
'Succ/inst0 (folded/Nat/inst0/site1)': 0 }
'folded/Nat/inst0/site1': {'Zero/inst0': 0,
'Succ/inst0 (folded/Nat/inst0/site0)': 0,
'Succ/inst0 (folded/Nat/inst0/site1)': 1}
}
Yes, that looks good!
(I can imagine someday wanting neither a List[List[Number]] nor a Dict[String, Dict[String, Number]] but rather a List[Dict[String, Number]] or a Dict[String, List[Number]], but that's not urgent.)
Yes, that looks good!
(I can imagine someday wanting neither a List[List[Number]] nor a Dict[String, Dict[String, Number]] but rather a List[Dict[String, Number]] or a Dict[String, List[Number]], but that's not urgent.)
This has been added in 182.
This one can be closed by #182.
These are already provided in the FGG file.