Open jmayank23 opened 2 years ago
I noticed the following line was commented in infer.py
args.num_classes = state['num_classes']
Is there a reason for that?
When I print state['num_classes'] I get 9605, how can I see a list of these class names?
Have you solved the question?
I get the following error when running infer.py
Inference demo with CSL model Creating and loading the model... Traceback (most recent call last): File "infer.py", line 112, in <module> main() File "infer.py", line 68, in main model = create_model(args).cuda() File "/content/PartialLabelingCSL/src/models/utils/factory.py", line 11, in create_model model_params = {'args': args, 'num_classes': args.num_classes} AttributeError: 'Namespace' object has no attribute 'num_classes'
Command to reproduce - python infer.py \ --dataset_type=OpenImages \ --model_name=tresnet_m \ --model_path=/content/drive/MyDrive/mtresnet_opim_86.72.pth \ --pic_path=/content/wildlife-painting-art-500x500.jpeg \ --input_size=224