반응형
class TEST(nn.Module):
def __init__(self):
super().__init__()
self.conv = nn.Conv2d(10, 10, 1)
def forward(self, x):
return self.conv(x)
num_res = 2
BEVEncoder = nn.ModuleDict()
UpSampler = nn.ModuleDict()
for _ in range(num_res):
IsSelfAttn = True if _ == 0 else False
BEVEncoder[str(_)] = TEST()
if (_ == 0):
UpSampler[str(_)] = None
else:
UpSampler[str(_)] = TEST()
for (_, enc), (_, up) in sorted(zip(BEVEncoder.items(), UpSampler.items()), reverse=True):
bp = 0
'Deep Learning' 카테고리의 다른 글
Feature Pyramid Network (FPN) pytorch implementation (0) | 2023.11.30 |
---|---|
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0. (0) | 2023.08.22 |
[Pytorch] Loading specific keys for NN initialization (0) | 2023.07.11 |
Image Frustum to Global 3D (0) | 2023.06.30 |
Deformable DETR attention operation cuda build (0) | 2023.06.20 |