Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

efficientnet with FPN can not be run #13

Open
lucasjinreal opened this issue Jul 2, 2021 · 4 comments
Open

efficientnet with FPN can not be run #13

lucasjinreal opened this issue Jul 2, 2021 · 4 comments

Comments

@lucasjinreal
Copy link

lucasjinreal commented Jul 2, 2021

efficient output shape are:

EEE:  0 torch.Size([4, 16, 512, 400])
EEE:  1 torch.Size([4, 24, 256, 200])
EEE:  2 torch.Size([4, 80, 64, 50])
EEE:  3 torch.Size([4, 112, 64, 50])

this is impossible to run on FPN......

@lucasjinreal
Copy link
Author

detectron2/detectron2/modeling/backbone/fpn.py", line 142, in forward
    prev_features = lateral_features + top_down_features
RuntimeError: The size of tensor a (50) must match the size of tensor b (100) at non-singleton dimension 3

with config:

  BACKBONE:
    NAME: "build_efficientnet_fpn_backbone"
  EFFICIENTNET:
    NAME: "efficientnet_b1"
    # OUT_FEATURES: ["stride8", "stride16", "stride32"] # fpn produce 4 levels, only using 3 for now
    OUT_FEATURES: ["stride4", "stride8", "stride16", "stride32"]
  FPN:
    # IN_FEATURES: ["stride8", "stride16", "stride32"]
    IN_FEATURES: ["stride4", "stride8", "stride16", "stride32"]
    OUT_CHANNELS: 64
    REPEAT: 3

@channingmonk
Copy link

detectron2/detectron2/modeling/backbone/fpn.py", line 142, in forward
    prev_features = lateral_features + top_down_features
RuntimeError: The size of tensor a (50) must match the size of tensor b (100) at non-singleton dimension 3

with config:

  BACKBONE:
    NAME: "build_efficientnet_fpn_backbone"
  EFFICIENTNET:
    NAME: "efficientnet_b1"
    # OUT_FEATURES: ["stride8", "stride16", "stride32"] # fpn produce 4 levels, only using 3 for now
    OUT_FEATURES: ["stride4", "stride8", "stride16", "stride32"]
  FPN:
    # IN_FEATURES: ["stride8", "stride16", "stride32"]
    IN_FEATURES: ["stride4", "stride8", "stride16", "stride32"]
    OUT_CHANNELS: 64
    REPEAT: 3

Hi @jinfagang, Have you solved the issue? I'm facing the same problem. Thanks!

@JanGlinko
Copy link

Same here. Any solutions?

@zhuzhu512
Copy link

我也遇到了,请问解决了吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants