We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d044276 commit a969237Copy full SHA for a969237
torch_em/model/unetr.py
@@ -104,7 +104,10 @@ def __init__(
104
else:
105
embed_dim = self.encoder.patch_embed.proj.out_channels
106
107
- in_chans = self.encoder.patch_embed.proj.in_channels
+ try:
108
+ in_chans = self.encoder.patch_embed.proj.in_channels
109
+ except AttributeError: # for getting the input channels while using vit_t from MobileSam
110
+ in_chans = self.encoder.patch_embed.seq[0].c.in_channels
111
112
# parameters for the decoder network
113
depth = 3
0 commit comments