File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
napari_cellseg3d/code_models/models Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 11"""SwinUNetR wrapper for napari_cellseg3d."""
2+
23import inspect
34
45from monai .networks .nets import SwinUNETR
@@ -37,6 +38,7 @@ def __init__(
3738 in_channels = in_channels ,
3839 out_channels = out_channels ,
3940 use_checkpoint = use_checkpoint ,
41+ feature_size = 48 ,
4042 drop_rate = 0.5 ,
4143 attn_drop_rate = 0.5 ,
4244 use_v2 = True ,
@@ -45,6 +47,9 @@ def __init__(
4547 if "img_size" in sig .parameters :
4648 # since MONAI API changes depending on py3.8 or py3.9
4749 init_kwargs ["img_size" ] = input_img_size
50+ if "dropout_prob" in kwargs :
51+ init_kwargs ["drop_rate" ] = kwargs ["dropout_prob" ]
52+ init_kwargs .pop ("dropout_prob" )
4853 try :
4954 parent_init (** init_kwargs )
5055 except TypeError as e :
You can’t perform that action at this time.
0 commit comments