Skip to content

glip demo run error #4

@LengZhuo0831

Description

@LengZhuo0831

Hello, thanks for your contributions. But there's a bug when I run demo_glip_sam.py, how can I solve it? Looking forward to your reply.

mnt/lustre/lengzhuo/Projects331/segment-anything-and-name-it/glip/maskrcnn_ benchmark/utils/fuse_helper.py:421 in single_attention_call
│   419 │   def single_attention_call(self, v, l, attention_mask_l=None, dummy 
│   420 │   │   v = self.layer_norm_v(v)                                       
│ ❱ 421    │   l = self.layer_norm_l(l)                                       
│   422 │   │   delta_v, delta_l = self.attn(v, l, attention_mask_l=attention_ 
│   423 │   │   # v, l = v + delta_v, l + delta_l                              
│   424 │   │   v = v + self.drop_path(self.gamma_v * delta_v)                 
RuntimeError: Given normalized_shape=[1024], expected input with shape [*, 1024], but got input of size[1, 256, 768]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions