refactor(net): 修改 DetailNode 的使用方式

- 在 DetailFeatureFusion 类中,将 DetailNode 的 useBlock 参数从 1 修改为 2
- 在 DetailFeatureExtraction 类中,将 DetailNode 的 useBlock 参数从 0 修改为 2
This commit is contained in:
zjut 2024-11-17 16:09:05 +08:00
parent 260e3aa760
commit b0030fe87f

4
net.py
View File

@ -274,7 +274,7 @@ class DetailNode(nn.Module):
class DetailFeatureFusion(nn.Module):
def __init__(self, num_layers=3):
super(DetailFeatureFusion, self).__init__()
INNmodules = [DetailNode(useBlock=1) for _ in range(num_layers)]
INNmodules = [DetailNode(useBlock=2) for _ in range(num_layers)]
self.net = nn.Sequential(*INNmodules)
def forward(self, x):
@ -286,7 +286,7 @@ class DetailFeatureFusion(nn.Module):
class DetailFeatureExtraction(nn.Module):
def __init__(self, num_layers=3):
super(DetailFeatureExtraction, self).__init__()
INNmodules = [DetailNode(useBlock=0) for _ in range(num_layers)]
INNmodules = [DetailNode(useBlock=2) for _ in range(num_layers)]
self.net = nn.Sequential(*INNmodules)
def forward(self, x):