I met the problem with "TypeError: PatchEmbeddingBlock.init() got an unexpected keyword argument 'pos_embed'" , when using the program in Quickstart (M3D-LaMed-Phi-3-4B).
Specifically, in "class myViT(nn.Module)":
self.patch_embedding = PatchEmbeddingBlock(
in_channels=in_channels,
img_size=img_size,
patch_size=patch_size,
hidden_size=hidden_size,
num_heads=num_heads,
pos_embed=pos_embed,
dropout_rate=dropout_rate,
spatial_dims=spatial_dims,
)
The argument 'pos_embed' can be 'proj_type'? But I can't modify this argument, because of the 'trust_remote_code=True'? So, what can I do to fix it.
By the way, I'm using transformers.version = '4.45.0.dev0'
I met the problem with "TypeError: PatchEmbeddingBlock.init() got an unexpected keyword argument 'pos_embed'" , when using the program in Quickstart (M3D-LaMed-Phi-3-4B). Specifically, in "class myViT(nn.Module)": self.patch_embedding = PatchEmbeddingBlock( in_channels=in_channels, img_size=img_size, patch_size=patch_size, hidden_size=hidden_size, num_heads=num_heads, pos_embed=pos_embed, dropout_rate=dropout_rate, spatial_dims=spatial_dims, ) The argument 'pos_embed' can be 'proj_type'? But I can't modify this argument, because of the 'trust_remote_code=True'? So, what can I do to fix it. By the way, I'm using transformers.version = '4.45.0.dev0'