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

test mambaunet #28

Open
996237275 opened this issue Jul 27, 2024 · 2 comments
Open

test mambaunet #28

996237275 opened this issue Jul 27, 2024 · 2 comments

Comments

@996237275
Copy link

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?

@xskdjs444
Copy link

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.

@zky1205
Copy link

zky1205 commented Dec 29, 2024

你好,请问您解决了吗?能分享一下如何将 Vim_seg 导入到 net_factory.py吗?

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