(self, name="vgg_lpips")
| 76 | param.requires_grad = False |
| 77 | |
| 78 | def load_from_pretrained(self, name="vgg_lpips"): |
| 79 | ckpt = get_ckpt_path(name) |
| 80 | self.load_state_dict( |
| 81 | torch.load(ckpt, map_location=torch.device("cpu")), strict=False |
| 82 | ) |
| 83 | |
| 84 | def forward(self, input, target): |
| 85 | in0_input, in1_input = (self.scaling_layer(input), self.scaling_layer(target)) |
no test coverage detected