Skip to content

AttributeError: 'NoneType' object has no attribute 'num_classes' #8

@Rahul-Venugopal

Description

@Rahul-Venugopal

Hi ,

I am running

python demo_image.py --image_name 'ILSVRC2012_val_00000004.JPEG'

and I am getting an error

Namespace(image_name='ILSVRC2012_val_00000004.JPEG', img_dir='examples/', input_size=321, num_classes=1000, save_dir='examples/results/', save_spg_c=True, snapshots='snapshots/imagenet_epoch_2_glo_step_128118.pth.tar', top_k=1)
Traceback (most recent call last):
  File "demo_image.py", line 69, in <module>
    model = load_model(args)
  File "demo_image.py", line 39, in load_model
    model = inceptionv3_spg.Inception3(num_classes=args.num_classes, threshold=0.5)
  File "/home/rahul/ActiveShuttle/WSOL/ACOL_SPG/SPG-master/models/google/inception3_spg.py", line 93, in __init__
    self.num_classes = args.num_classes
AttributeError: 'NoneType' object has no attribute 'num_classes'

Can anyone please help to find the problem ?

Thanks
Rahul

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions