File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,25 @@ class Step(base_layer.BaseLayer):
4343 This can be seen as an RNNCell extended with optional external inputs.
4444 """
4545
46+ adaptive_task_ids = None
47+ adaptive_task_dim = 0
48+
49+ @classmethod
50+ def Params (cls ):
51+ p = super ().Params ()
52+ p .Define ('adaptive_task_ids' , None ,
53+ 'Name of task IDs to adaptively control joint network.' )
54+ p .Define ('adaptive_task_dim' , 0 ,
55+ 'Dimension of task IDs to adaptively control joint network.' )
56+ return p
57+
58+ def __init__ (self , params ):
59+ super ().__init__ (params )
60+ p = params
61+ # set the adaptive controllers
62+ self .adaptive_task_ids = p .adaptive_task_ids
63+ self .adaptive_task_dim = p .adaptive_task_dim
64+
4665 def PrepareExternalInputs (self , theta , external_inputs ):
4766 """Returns the prepared external inputs, e.g., packed_src for attention."""
4867 if not external_inputs :
You can’t perform that action at this time.
0 commit comments