Skip to content

Error when pass norm_name = 'layer' for swin_unetr #196

@DiDiDD

Description

@DiDiDD

Hello,

I wanted to apply layer norm for model swin_unetr by setting norm_name='layer', but I got errors TypeError: LayerNorm.init() missing 1 required positional argument: 'normalized_shape'.

But i got no problems when applying batch norm and i just set norm_name='batch'.

model_su = SwinUNETR(img_size = (512, 512), in_channels=3, out_channels=3,
depths=depths,
num_heads=(3, 6, 12, 24),
feature_size=12,
norm_name= norm_name,
drop_rate=0.0,
attn_drop_rate=0.0,
dropout_path_rate=0.0,
normalize=True,
use_checkpoint=False,
spatial_dims=2,
downsample='merging')

Can someone help me, please? Many thanks!

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