从昨晚开始我一直遇到这样的错误。我训练了5个模型,没有问题。然后就出现了这样的问题。如何解决它?
AssertionError Traceback (most recent call last)<ipython-input-9-08522bc16525> in <module>() 34 os.makedirs(cfg.OUTPUT_DIR, exist_ok=True) 35 trainer = CocoTrainer(cfg)---> 36 trainer.resume_or_load(resume=False) 37 trainer.train()2 frames/usr/local/lib/python3.6/dist-packages/fvcore/common/checkpoint.py in load(self, path, checkpointables) 118 if not os.path.isfile(path): 119 path = self.path_manager.get_local_path(path)--> 120 assert os.path.isfile(path), "Checkpoint {} not found!".format(path) 121 122 checkpoint = self._load_file(path)AssertionError: Checkpoint https://dl.fbaipublicfiles.com/detectron2/COCO-Detection/faster_rcnn_X_101_32x8d_FPN_3x/139173657/model_final_68b088.pkl not found!
回答:
目前,我找到了一种手动解决方案。我从链接中下载了模型并保存到我的驱动器配置文件中。然后我将模型从驱动器配置文件复制到输出文件中,并对下面的代码进行了修改。
cfg.MODEL.WEIGHTS = "/content/output/model_final_68b088.pkl"
可能有更好的解决方案,但我不知道。我认为访问链接中的模型文件有问题。