From c023c0801d9dda28e5b67ec94bc2dabd7020524e Mon Sep 17 00:00:00 2001 From: whai Date: Fri, 15 Nov 2024 09:14:15 +0800 Subject: [PATCH] =?UTF-8?q?refactor(net):=20=E6=B3=A8=E9=87=8A=E6=8E=89=20?= =?UTF-8?q?DetailFeatureExtraction=E3=80=81DetailFeatureFusion=20=E5=92=8C?= =?UTF-8?q?=20DetailFeatureExtractionSAR=20=E7=B1=BB=E4=B8=AD=E7=9A=84=20e?= =?UTF-8?q?nhancement=5Fmodule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在三个类中注释掉了 enhancement_module 的定义 - 该改动可能是为了暂时禁用增强模块的功能或进行调试 --- net.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net.py b/net.py index 4841dad..1791517 100644 --- a/net.py +++ b/net.py @@ -327,7 +327,7 @@ class DetailFeatureExtraction(nn.Module): super(DetailFeatureExtraction, self).__init__() INNmodules = [DetailNode(use) for _ in range(num_layers)] self.net = nn.Sequential(*INNmodules) - self.enhancement_module = WTConv2d(32, 32) + # self.enhancement_module = WTConv2d(32, 32) def forward(self, x): # 1 64 128 128 z1, z2 = x[:, :x.shape[1] // 2], x[:, x.shape[1] // 2:x.shape[1]] # 1 32 128 128 @@ -346,7 +346,7 @@ class DetailFeatureFusion(nn.Module): super(DetailFeatureFusion, self).__init__() INNmodules = [DetailNode() for _ in range(num_layers)] self.net = nn.Sequential(*INNmodules) - self.enhancement_module = WTConv2d(32, 32) + # self.enhancement_module = WTConv2d(32, 32) def forward(self, x): # 1 64 128 128 z1, z2 = x[:, :x.shape[1] // 2], x[:, x.shape[1] // 2:x.shape[1]] # 1 32 128 128 @@ -582,7 +582,7 @@ class DetailFeatureExtractionSAR(nn.Module): super(DetailFeatureExtractionSAR, self).__init__() INNmodules = [DetailNode(useBlock=1) for _ in range(num_layers)] self.net = nn.Sequential(*INNmodules) - self.enhancement_module = WTConv2d(32, 32) + # self.enhancement_module = WTConv2d(32, 32) def forward(self, x): # 1 64 128 128 z1, z2 = x[:, :x.shape[1] // 2], x[:, x.shape[1] // 2:x.shape[1]] # 1 32 128 128