gan_things.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:sourceseparation_misc 作者: ycemsubakan 项目源码 文件源码
def forward(self, inp):
        #if inp.dim() > 2:
        #    inp = inp.permute(0, 2, 1)
        #inp = inp.contiguous().view(-1, self.L1)
        if not (type(inp) == Variable):
            inp = Variable(inp[0])

        h = F.relu(self.l1(inp))
        output = (self.l2(h))

        if self.smooth_output:
            output = output.view(-1, 1, int(np.sqrt(self.L2)), int(np.sqrt(self.L2)))
            output = F.softplus(self.sml(output))
            output = output.view(-1, self.L2)
        return output
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号