Advertisement

让照片动起来First Motion Model(4)-对抗生成网络与模型培训

阅读量:

1、概述

本章将介绍模型剩余的部分与数据加载与训练

2、GeneratorFullModel完整的生成器

2.1 金字塔网络(ImagePyramide)

该网络用于获取不同缩放比的照片

复制代码
 class ImagePyramide(torch.nn.Module):

    
     """
    
     Create image pyramide for computing pyramide perceptual loss. See Sec 3.3
    
     """
    
     def __init__(self, scales, num_channels):
    
     super(ImagePyramide, self).__init__()
    
     downs = {}
    
     for scale in scales:
    
         downs[str(scale).replace('.', '-')] = AntiAliasInterpolation2d(num_channels, scale)
    
     self.downs = nn.ModuleDict(downs)
    
  
    
     def forward(self, x

全部评论 (0)

还没有任何评论哟~