cpeng93/SAINT

Easy way to run SAINT for testing

Opened this issue · 0 comments

Thank you for the great work of SAINT.

But when I tried to run the code for testing, a lot of problems pops up. For example, all the dependencies are without specifying version causing failing. After sorting it out manually, still error pops up.

For example, I tried to use SAINt for testing with
python main.py --scale 4 --save COLON --loss 1\*L1 --model META_MULTI --epochs 150 --batch_size 1 --dir_data /home/shij3/Task08_HepaticVessel/data --data_test TEST --data_range 1-10000/1-24 --n_colors 3 --RDNconfig C --pre_train SAINT_ckpt/model_comb.pt --save_results --stage 2 --test_only --cpu

and error showed as
Making model... Loading model from SAINT_ckpt/model_comb.pt Traceback (most recent call last): File "main.py", line 15, in <module> model = model.Model(args, checkpoint) File "/home/shij3/SAINT/model/__init__.py", line 47, in __init__ cpu=args.cpu File "/home/shij3/SAINT/model/__init__.py", line 95, in load self.get_model().load_state_dict( File "/home/shij3/SAINT/model/__init__.py", line 55, in get_model return self.model.module File "/home/shij3/anaconda3/envs/saint/lib/python3.7/site-packages/torch/nn/modules/module.py", line 535, in __getattr__ type(self).__name__, name)) AttributeError: 'MSR_RDN' object has no attribute 'module'.

I wonder is there a easy way to use SAINT for testing or instructions of how to use it. Thank you!