in archs/models.py [0:0]
def forward(self, tdesc=None):
"""TODO: Docstring for function.
:arg1: TODO
:returns: TODO
"""
if tdesc is None:
return None
x = tdesc
task_embeds1 = F.relu(self.task_bn1(self.task_linear1(x)))
joint_embed = task_embeds1
joint_embed = self.joint_linear2(joint_embed)
joint_embed = [[
joint_embed[:, self.out_ind[i][j][0]:self.out_ind[i][j][1]]
for j in range(len(self.out_ind[i]))
] for i in range(len(self.out_ind))]
gating_wt = joint_embed
prob_g = [[F.softmax(wt, -1) for wt in gating_wt[i]]
for i in range(len(gating_wt))]
return prob_g, gating_wt