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

Something wrong in train_Semi_Mamba_UNet.py #25

Open
onion-LHJ opened this issue Jun 25, 2024 · 2 comments
Open

Something wrong in train_Semi_Mamba_UNet.py #25

onion-LHJ opened this issue Jun 25, 2024 · 2 comments

Comments

@onion-LHJ
Copy link

When I ran train_Semi_Mamba_UNet.py, there is a bug:
Traceback (most recent call last):
File "train_Semi_Mamba_UNet.py", line 396, in
train(args, snapshot_path)
File "train_Semi_Mamba_UNet.py", line 183, in train
model1.train()
NameError: name 'model1' is not defined

And then I check the code ,notice that :
微信截图_20240625152742

I would be most grateful.if u could tell me what model1 should be .Thanks again for ur great work.

@xskdjs444
Copy link

Hi, are you sloved this problem? this problem is caused by two model2 are definitioned. So you can ues function of create_model to definition model1 such as UNet . Hope this will help you!

@Lxycherryup
Copy link

(vmunet) liu@liu-ubuntu:~/lxy/Mamba-UNet-main/Mamba-UNet-main/code$ python test_2D_fully.py --root_path ../data/ACDC --exp ACDC/Semi_Mamba_UNet --model mambaunet
test_2D_fully.py:12: DeprecationWarning: Please use zoom from the scipy.ndimage namespace, the scipy.ndimage.interpolation namespace is deprecated.
from scipy.ndimage.interpolation import zoom
=> merge config from ../code/configs/swin_tiny_patch4_window7_224_lite.yaml
../model/ACDC/Semi_Mamba_UNet_3/mambaunet/mambaunet_best_model.pth
Traceback (most recent call last):
File "test_2D_fully.py", line 124, in
metric = Inference(FLAGS)
File "test_2D_fully.py", line 104, in Inference
net.load_state_dict(torch.load(save_mode_path))
AttributeError: 'NoneType' object has no attribute 'load_state_dict'
Hello there! I’m reaching out for some guidance on how to test the Semi_Mamba_UNet model effectively. I’d appreciate any step-by-step advice or recommendations on best practices for running and evaluating it. Thanks so much for your help!

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

3 participants