def forward(self, x, hint):
v = self.toH(hint)
x0 = self.to0(x)
x1 = self.to1(x0)
x2 = self.to2(x1)
x3 = self.to3(torch.cat([x2, v], 1))
x4 = self.to4(x3)
x = self.tunnel4(x4)
x = self.tunnel3(torch.cat([x, x3.detach()], 1))
x = self.tunnel2(torch.cat([x, x2.detach()], 1))
x = self.tunnel1(torch.cat([x, x1.detach()], 1))
x = F.tanh(self.exit(torch.cat([x, x0.detach()], 1)))
return x
评论列表
文章目录