You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, hope you're doing well. I have a question that's not directly on the scope of your repo, but would appreciate any direction on what's going wrong.
I'm trying to separate the backbone (ResNet 50) and detector (Deformable DETR), so that later I can work on some modification more easily. As such, my backbone does not utilizes NestedTensor and the output features from it are converted to NestedTensor when received by the Deformable DETR.
A few modifications were made on the Deformable DETR side:
Backbone is not received as parameter in init, only a list containing the output channels for each feature level;
Transformer is not received as parameter in init, for simplicity, right now the transformer is always built using build_deforamble_transformer directly inside init;
forward receives x and features, x is the original input before the backbone, features are the outputs from the backbone;
the condition for if self.num_feature_levels > len(srcs) was removed as it is guarateed for now boths value are the same;
When receiving a (2x3x69x69) x dummy input (filled with ones) I get an error at tmp[..., :2] += reference: RuntimeError: output with shape [100, 2] doesn't match the broadcast shape [2, 100, 2]. I do not understand why.
My features have all expected shapes:
0 torch.Size([2, 64, 69, 69])
1 torch.Size([2, 256, 69, 69])
2 torch.Size([2, 512, 35, 35])
3 torch.Size([2, 1024, 18, 18])
4 torch.Size([2, 2048, 9, 9])
Below is the DeformableDETR class as modified with documentation and comments removed for compacting.
Hello, hope you're doing well. I have a question that's not directly on the scope of your repo, but would appreciate any direction on what's going wrong.
I'm trying to separate the backbone (ResNet 50) and detector (Deformable DETR), so that later I can work on some modification more easily. As such, my backbone does not utilizes
NestedTensor
and the output features from it are converted toNestedTensor
when received by the Deformable DETR.A few modifications were made on the Deformable DETR side:
build_deforamble_transformer
directly inside init;forward
receivesx
andfeatures
,x
is the original input before the backbone,features
are the outputs from the backbone;if self.num_feature_levels > len(srcs)
was removed as it is guarateed for now boths value are the same;When receiving a (2x3x69x69)
x
dummy input (filled with ones) I get an error attmp[..., :2] += reference
:RuntimeError: output with shape [100, 2] doesn't match the broadcast shape [2, 100, 2]
. I do not understand why.My
features
have all expected shapes:0 torch.Size([2, 64, 69, 69])
1 torch.Size([2, 256, 69, 69])
2 torch.Size([2, 512, 35, 35])
3 torch.Size([2, 1024, 18, 18])
4 torch.Size([2, 2048, 9, 9])
Below is the DeformableDETR class as modified with documentation and comments removed for compacting.
The text was updated successfully, but these errors were encountered: