Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

detectron2环境的X-101-64x4d预训练权重用不了 #41

Open
gfzwytc opened this issue Dec 17, 2022 · 0 comments
Open

detectron2环境的X-101-64x4d预训练权重用不了 #41

gfzwytc opened this issue Dec 17, 2022 · 0 comments

Comments

@gfzwytc
Copy link

gfzwytc commented Dec 17, 2022

训练时使用X-101-64x4d作为主干网络,下载的预训练权重无法使用,权重文件的下载地址在detectron文件夹中。
但是其他主干网络的预训练权重的下载地址都在detectron2文件夹中,是因为X-101-64x4d的预训练权重和detectron2的环境不匹配吗,请问作者在训练时有遇到过这样的问题吗?

image
image

[12/17 21:15:06 d2.data.build]: Using training sampler TrainingSampler
[12/17 21:15:06 d2.data.common]: Serializing 5199 elements to byte tensors and concatenating them all ...
[12/17 21:15:06 d2.data.common]: Serialized dataset takes 16.94 MiB
[12/17 21:15:06 fvcore.common.checkpoint]: [Checkpointer] Loading from catalog://ImageNetPretrained/FAIR/X-101-64x4d ...
[12/17 21:15:06 d2.checkpoint.catalog]: Catalog entry catalog://ImageNetPretrained/FAIR/X-101-64x4d points to https://dl.fbaipublicfiles.com/detectron/ImageNetPretrained/FBResNeXt/X-101-64x4d.pkl
Traceback (most recent call last):
File "train_Rtinanet.py", line 175, in
args=(args,),
File "D:\paddle\detectron2\detectron2\engine\launch.py", line 82, in launch
main_func(*args)
File "train_Rtinanet.py", line 158, in main
trainer.resume_or_load(resume=args.resume)
File "D:\paddle\detectron2\detectron2\engine\defaults.py", line 412, in resume_or_load
self.checkpointer.resume_or_load(self.cfg.MODEL.WEIGHTS, resume=resume)
File "D:\Anaconda\envs\detectron2\lib\site-packages\fvcore\common\checkpoint.py", line 229, in resume_or_load
return self.load(path, checkpointables=[])
File "D:\paddle\detectron2\detectron2\checkpoint\detection_checkpoint.py", line 52, in load
ret = super().load(path, *args, **kwargs)
File "D:\Anaconda\envs\detectron2\lib\site-packages\fvcore\common\checkpoint.py", line 156, in load
incompatible = self._load_model(checkpoint)
File "D:\paddle\detectron2\detectron2\checkpoint\detection_checkpoint.py", line 95, in _load_model
self._convert_ndarray_to_tensor(checkpoint["model"])
File "D:\Anaconda\envs\detectron2\lib\site-packages\fvcore\common\checkpoint.py", line 372, in _convert_ndarray_to_tensor
"Unsupported type found in checkpoint! {}: {}".format(k, type(v))
ValueError: Unsupported type found in checkpoint! weight_order: <class 'str'>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant