(self)
| 14 | |
| 15 | class VGGLoss(nn.Module): |
| 16 | def __init__(self): |
| 17 | super().__init__() |
| 18 | #features map = [1, 512, 14, 14] |
| 19 | self.vgg = vgg19(pretrained=True).features[:36].eval().to(config.DEVICE) |
| 20 | print(self.vgg) |
| 21 | self.loss = nn.MSELoss() |
| 22 | |
| 23 | for param in self.vgg.parameters(): |
| 24 | param.requires_grad = False |
| 25 | |
| 26 | def forward(self, input, target): |
| 27 | vgg_input_features = self.vgg(input) |
nothing calls this directly
no outgoing calls
no test coverage detected