latest.pth
Traceback (most recent call last):
File "D:/domain/Transfer-Learning-Library-master/examples/domain_adaptation/object_detection/visualize.py", line 142, in
launch(
File "d:\domain\detectron2-main\detectron2\engine\launch.py", line 82, in launch
main_func(args)
File "D:/domain/Transfer-Learning-Library-master/examples/domain_adaptation/object_detection/visualize.py", line 97, in main
DetectionCheckpointer(model, save_dir=cfg.OUTPUT_DIR).resume_or_load(
File "C:\Users\xingze\AppData\Roaming\Python\Python38\site-packages\fvcore\common\checkpoint.py", line 229, in resume_or_load
return self.load(path, checkpointables=[])
File "d:\domain\detectron2-main\detectron2\checkpoint\detection_checkpoint.py", line 52, in load
ret = super().load(path, args, **kwargs)
File "C:\Users\xingze\AppData\Roaming\Python\Python38\site-packages\fvcore\common\checkpoint.py", line 158, in load
incompatible = self._load_model(checkpoint)
File "d:\domain\detectron2-main\detectron2\checkpoint\detection_checkpoint.py", line 96, in _load_model
self._convert_ndarray_to_tensor(checkpoint["model"])
File "C:\Users\xingze\AppData\Roaming\Python\Python38\site-packages\fvcore\common\checkpoint.py", line 371, in _convert_ndarray_to_tensor
raise ValueError(
ValueError: Unsupported type found in checkpoint! netG_S2T: <class 'collections.OrderedDict'>
进程已结束,退出代码 1
报错位置:
model could be an OrderedDict with _metadata attribute
# (as returned by Pytorch's state_dict()). We should preserve these
# properties.
for k in list(state_dict.keys()):
v = state_dict[k]
if not isinstance(v, np.ndarray) and not isinstance(v, torch.Tensor):
raise ValueError(
"Unsupported type found in checkpoint! {}: {}".format(k, type(v))
)
if not isinstance(v, torch.Tensor):
state_dict[k] = torch.from_numpy(v)
latest.pth Traceback (most recent call last): File "D:/domain/Transfer-Learning-Library-master/examples/domain_adaptation/object_detection/visualize.py", line 142, in
launch(
File "d:\domain\detectron2-main\detectron2\engine\launch.py", line 82, in launch
main_func(args)
File "D:/domain/Transfer-Learning-Library-master/examples/domain_adaptation/object_detection/visualize.py", line 97, in main
DetectionCheckpointer(model, save_dir=cfg.OUTPUT_DIR).resume_or_load(
File "C:\Users\xingze\AppData\Roaming\Python\Python38\site-packages\fvcore\common\checkpoint.py", line 229, in resume_or_load
return self.load(path, checkpointables=[])
File "d:\domain\detectron2-main\detectron2\checkpoint\detection_checkpoint.py", line 52, in load
ret = super().load(path, args, **kwargs)
File "C:\Users\xingze\AppData\Roaming\Python\Python38\site-packages\fvcore\common\checkpoint.py", line 158, in load
incompatible = self._load_model(checkpoint)
File "d:\domain\detectron2-main\detectron2\checkpoint\detection_checkpoint.py", line 96, in _load_model
self._convert_ndarray_to_tensor(checkpoint["model"])
File "C:\Users\xingze\AppData\Roaming\Python\Python38\site-packages\fvcore\common\checkpoint.py", line 371, in _convert_ndarray_to_tensor
raise ValueError(
ValueError: Unsupported type found in checkpoint! netG_S2T: <class 'collections.OrderedDict'>
进程已结束,退出代码 1
报错位置:
model could be an OrderedDict with _metadata attribute
还要问下如何将自己的数据、图片根据训练权重全部进行转化,生成所有每张原图像对应的结果图片