TransUNet icon indicating copy to clipboard operation
TransUNet copied to clipboard

An Keyerror occurred while running the test.py

Open wangyueying666 opened this issue 4 years ago • 12 comments

When running the test file, tracing back to class DecoderCup under the vit_seg_modeling file, the variable 'self.config.skip_channels' was not found. error keyerror

wangyueying666 avatar Nov 14 '21 13:11 wangyueying666

I got the same error. Did u solve the issue?

Ell-M avatar Nov 15 '21 23:11 Ell-M

found it. I had to change this in test.py set the default parser.add_argument('--vit_name', type=str, default='R50-ViT-B_16', help='select one vit model')

Ell-M avatar Nov 16 '21 01:11 Ell-M

found it. I had to change this in test.py set the default parser.add_argument('--vit_name', type=str, default='R50-ViT-B_16', help='select one vit model')

Thank you very much. That really worked out!

wangyueying666 avatar Nov 18 '21 13:11 wangyueying666

found it. I had to change this in test.py set the default parser.add_argument('--vit_name', type=str, default='R50-ViT-B_16', help='select one vit model')

Sorry to bother you, but do you know why it can be solved in this way?

wangyueying666 avatar Nov 18 '21 13:11 wangyueying666

in train.py we used a pretrained model default='R50-ViT-B_16' it should be the same in test.py to find where we saved the model and make the prediction on our test database

Ell-M avatar Nov 18 '21 13:11 Ell-M

in train.py we used a pretrained model default='R50-ViT-B_16' it should be the same in test.py to find where we saved the model and make the prediction on our test database

I see! Thank you! Wish you all the best~

wangyueying666 avatar Nov 18 '21 13:11 wangyueying666

找到了。我必须在 test.py 中更改它设置默认 parser.add_argument('--vit_name', type=str, default='R50-ViT-B_16', help='select one vit model')

你好,我在运行test.py时出现如下错误: NE}B9TETU2`Y8EI2@4}{$AL 请问你知道如何解决吗,非常感谢!

wtkszzz avatar Mar 01 '22 11:03 wtkszzz

R50-ViT

你好,我运行test.py时遇到下面的问题,请问你知道如何解决吗 ,十分感谢!

wtkszzz avatar Mar 01 '22 12:03 wtkszzz

R50-ViT

你好,我运行test.py时遇到下面的问题,请问你知道如何解决吗 ,十分感谢!

是不是数据的问题?打不开.h5文件?

wangyueying666 avatar Mar 01 '22 12:03 wangyueying666

我不知道是哪个数据出了问题,用的数据是作者给我的

wtkszzz avatar Mar 01 '22 12:03 wtkszzz

我不知道是哪个数据出了问题,用的数据是作者给我的

你再检查一下路径有没有问题,你改过代码嘛?

wangyueying666 avatar Mar 01 '22 12:03 wangyueying666

我不知道是哪个数据出了问题,用的数据是作者给我的

你再检查一下路径有没有问题,你改过代码嘛?

没有动过,直接是作者给我的,方便加个联系方式吗,QQ 739371273 非常感谢你的回复!

wtkszzz avatar Mar 01 '22 12:03 wtkszzz