'RepVGG model test process

'Hello, after the repvgg algorithm creates the model, when I test the model using the test.py file, it gives the following error, can you tell me the reason?

Traceback (most recent call last): File "/content/X-SDD-A-New-benchmark/test.py", line 15, in model=torch.load('/content/gdrive/MyDrive/RepVGG16/repvgg_save.pth') File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 712, in load return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args) File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 1046, in _load result = unpickler.load() File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 1039, in find_class return super().find_class(mod_name, name) AttributeError: Can't get attribute 'RepVGG' on <module 'main' from '/content/X-SDD-A-New-benchmark/test.py'>



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source