You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Long chains of modules can be confusing, and keeping track of all intermediate values can lead to some confusion.
It'd be nice to be able to build layers without specifying in/out_keys and have them bound to each other authomatically.
Keys that are not specified will be generated automatically and discarded after completion.
Solution
Example:
mod=Seq(
Mod(lambdax: x+1, in_keys=["x"]), # we always need an in_keys at the beginning, out_keys is figured out automaticallyMod(lambdax: 2*x), # in_keys and out_keys are lazily set - the previous output will be used as in_keysMod(lambdax: (x, x.sqrt())), # This should also work: 2 out_keys will automatically be setMod(lambdax, y, z: x+y+z), # This will raise an exception as we are waiting for 3 values but the previous module only had 2 outputs
)
The text was updated successfully, but these errors were encountered:
Motivation
Long chains of modules can be confusing, and keeping track of all intermediate values can lead to some confusion.
It'd be nice to be able to build layers without specifying in/out_keys and have them bound to each other authomatically.
Keys that are not specified will be generated automatically and discarded after completion.
Solution
Example:
The text was updated successfully, but these errors were encountered: