dk-liang / AutoScale

[IJCV 22] An implementation of AutoScale localization-based method
26 stars 7 forks source link

'TypeError: the first argument must be callable' while trying to test the model. #3

Open ajxv opened 1 year ago

ajxv commented 1 year ago

I am getting the following error while trying to test the model using pre-trained model. Any idea how to resolve this?

Link to Google colab: https://colab.research.google.com/drive/1-NapNL5Xl9pXIBcF9q5JQtaGvnkS2eOp?usp=sharing

=> loading checkpoint './model/ShanghaiA/model_best.pth'
Traceback (most recent call last):
  File "/content/AutoScale/val.py", line 248, in <module>
    main()
  File "/content/AutoScale/val.py", line 57, in main
    checkpoint = torch.load(args.pre)
  File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 815, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 840, in _legacy_load
    class UnpicklerWrapper(pickle_module.Unpickler):  # type: ignore[name-defined]
TypeError: the first argument must be callable