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
Currently, when constructing a model that takes task information as an input, we first need to construct the task the model will be asked to perform.
For example, SimpleFeedback has a neural network whose inputs include the task information (which depends on the task) as well as the sensory feedback, which depends on the user's specification of which state variables are provided as feedback.
Thus a typical model construction looks something like:
However, maybe we'll want to construct models without knowing beforehand what the task will exactly be.
This is one possible use case for a subclass of AbstractIntervenor: we can add inputs to neural networks as interventions on the state of the network's input layer(s), prior to the forward pass of the network.
Similarly, upon construction of SimpleFeedback, we could modify the effective input size of net to include the sensory feedback variables, either through a method provided by (in this case) SimpleStagedNetwork that returns a modified model, or else by using add_intervenor.
There are a couple of related problems here.
If we use add_intervenor to add an intervention to SimpleStagedNetwork, those inputs will not be reflected by its attribute input_size. In principle we could infer the change to input size caused by certain kinds of intervenors, but this would probably be unwise if those input variables do not actually appear in the input to the network module, but are routed in by an intervenor added to a module higher up in the model tree (e.g. SimpleFeedback).
Currently, an intervenor can only select its input state as some node(s) from the state PyTree operated on by the model it belongs to. The intervenor cannot take as input any part of its model's input argument. Thus there is no way for us to pass the task information—which shows up as input at the top-level of the model PyTree—into the intervenor and have it affect the state. In principle we could try to fix this by allowing the intervenor to also access the inputs of the model it belongs to, but currently the input to an intervenor is used only to supply it with its intervention parameters.
Clearly there either needs to be a change to how we handle model inputs (#12) that will make it easier to use intervenors for this purpose, or else we should abandon this intervenor use case altogether.
The text was updated successfully, but these errors were encountered:
Currently, when constructing a model that takes task information as an input, we first need to construct the task the model will be asked to perform.
For example,
SimpleFeedback
has a neural network whose inputs include the task information (which depends on the task) as well as the sensory feedback, which depends on the user's specification of which state variables are provided as feedback.Thus a typical model construction looks something like:
However, maybe we'll want to construct models without knowing beforehand what the task will exactly be.
This is one possible use case for a subclass of
AbstractIntervenor
: we can add inputs to neural networks as interventions on the state of the network's input layer(s), prior to the forward pass of the network.Similarly, upon construction of
SimpleFeedback
, we could modify the effective input size ofnet
to include the sensory feedback variables, either through a method provided by (in this case)SimpleStagedNetwork
that returns a modified model, or else by usingadd_intervenor
.There are a couple of related problems here.
add_intervenor
to add an intervention toSimpleStagedNetwork
, those inputs will not be reflected by its attributeinput_size
. In principle we could infer the change to input size caused by certain kinds of intervenors, but this would probably be unwise if those input variables do not actually appear in theinput
to the network module, but are routed in by an intervenor added to a module higher up in the model tree (e.g.SimpleFeedback
).state
as some node(s) from the state PyTree operated on by the model it belongs to. The intervenor cannot take as input any part of its model'sinput
argument. Thus there is no way for us to pass the task information—which shows up asinput
at the top-level of the model PyTree—into the intervenor and have it affect the state. In principle we could try to fix this by allowing the intervenor to also access the inputs of the model it belongs to, but currently theinput
to an intervenor is used only to supply it with its intervention parameters.Clearly there either needs to be a change to how we handle model inputs (#12) that will make it easier to use intervenors for this purpose, or else we should abandon this intervenor use case altogether.
The text was updated successfully, but these errors were encountered: