networks.py 文件源码

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

项目:DeblurGAN 作者: KupynOrest 项目源码 文件源码
def forward(self, input):
        if self.gpu_ids and isinstance(input.data, torch.cuda.FloatTensor) and self.use_parallel:
            output = nn.parallel.data_parallel(self.model, input, self.gpu_ids)
        else:
            output = self.model(input)
        if self.learn_residual:
            output = input + output
            output = torch.clamp(output,min = -1,max = 1)
        return output


# Defines the submodule with skip connection.
# X -------------------identity---------------------- X
#   |-- downsampling -- |submodule| -- upsampling --|
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号