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

Runtime error in Colab #129

Open
gttae opened this issue Apr 15, 2024 · 1 comment
Open

Runtime error in Colab #129

gttae opened this issue Apr 15, 2024 · 1 comment

Comments

@gttae
Copy link

gttae commented Apr 15, 2024

Thank you for conducting such excellent research.
I have modified the train code to run it on Colab and executed it. However, I am leaving this message to seek advice because I encountered this error.

in build_sam_vit_b(checkpoint)
32
33 def build_sam_vit_b(checkpoint=None):
---> 34 return _build_sam(
35 encoder_embed_dim=768,
36 encoder_depth=12,

in _build_sam(encoder_embed_dim, encoder_depth, encoder_num_heads, encoder_global_attn_indexes, checkpoint)
61 image_embedding_size = image_size // vit_patch_size
62 sam = Sam(
---> 63 image_encoder=ImageEncoderViT(
64 depth=encoder_depth,
65 embed_dim=encoder_embed_dim,

in init(self, img_size, patch_size, in_chans, embed_dim, depth, num_heads, mlp_ratio, out_chans, qkv_bias, norm_layer, act_layer, use_abs_pos, use_rel_pos, rel_pos_zero_init, window_size, global_attn_indexes)
72
73 for i in range(depth):
---> 74 block = Block(
75 dim=embed_dim,
76 num_heads=num_heads,

in init(self, dim, num_heads, mlp_ratio, qkv_bias, norm_layer, act_layer, use_rel_pos, rel_pos_zero_init, window_size, input_size)
153 super().init()
154 self.norm1 = norm_layer(dim)
--> 155 self.attn = Attention(
156 dim,
157 num_heads=num_heads,

TypeError: Attention.init() got an unexpected keyword argument 'qkv_bias'

@gttae
Copy link
Author

gttae commented Apr 15, 2024

Can I receive the file 'pretrained_checkpoint/sam_vit_b_maskdecoder.pth'?

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

1 participant