ziyangwang007/Mamba-UNet

test mambaunet

996237275 opened this issue · 1 comments

Wonderful work!
I've trained mambaunet and got corresponding .pth files already.
When I use test_2D_fully.py, there is a problem:
Traceback (most recent call last):
File "/tmp/pycharm_project_584/Mamba-UNet-main/code/test_2D_fully.py", line 125, in
metric = Inference(FLAGS)
File "/tmp/pycharm_project_584/Mamba-UNet-main/code/test_2D_fully.py", line 105, in Inference
net.load_state_dict(torch.load(save_mode_path),strict=False)
AttributeError: 'NoneType' object has no attribute 'load_state_dict'
I import Vim_seg to net_factory.py, but there still have some problems.
Could you kindly share the test_2D_fully.py and netfactory.py?

Hi, This problem maybe is caused by you did not defined or import UNet model or Vim model. Actually, if you want to test of UNet, you should first import UNet and defined it again such as train.py . Then you should put true model.pth in test code. Hope it can help you.