From 303cbfa024b6ed8ff0415c9d5d4b6b6ff2ec6aa1 Mon Sep 17 00:00:00 2001 From: henryruhs Date: Mon, 24 Feb 2025 00:18:35 +0100 Subject: [PATCH] Final refactoring for AAD done --- face_swapper/src/networks/aad.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/face_swapper/src/networks/aad.py b/face_swapper/src/networks/aad.py index 6d2e17d..ac5b252 100644 --- a/face_swapper/src/networks/aad.py +++ b/face_swapper/src/networks/aad.py @@ -62,24 +62,6 @@ class AdaptiveFeatureModulation(nn.Module): return primary_layers - @staticmethod - def _create_primary_layers(input_channels : int, output_channels : int, attribute_channels : int, identity_channels : int, num_blocks : int) -> nn.ModuleList: - primary_layers = nn.ModuleList() - - for index in range(num_blocks): - primary_layers.extend( - [ - FeatureModulation(input_channels, attribute_channels, identity_channels), - nn.ReLU(inplace = True) - ]) - - if index < num_blocks - 1: - primary_layers.append(nn.Conv2d(input_channels, input_channels, kernel_size = 3, padding = 1, bias = False)) - else: - primary_layers.append(nn.Conv2d(input_channels, output_channels, kernel_size = 3, padding = 1, bias = False)) - - return primary_layers - @staticmethod def create_shortcut_layers(input_channels : int, output_channels : int, attribute_channels : int, identity_channels : int) -> nn.ModuleList: shortcut_layers = nn.ModuleList()