Closed zgsxwsdxg closed 2 years ago
仓库主页
仓库主页
下载的文件名字是bit-rsp-vitaev2-s-levir-ckpt.pth和VitAE_window/output/ViTAE_Window_NoShift_12_basic_stages4_14_224/epoch100/ViTAE_Window_NoShift_12_basic_stages4_14/default/ckpt.pth 是一个吗?
仓库主页
if self.args.mode == 'imp': pretrained = '../pretrain_model/ViTAE_Window_NoShift_12_basic_stages4_14_best.pth.tar' elif self.args.mode == 'rsp_40': pretrained = '../VitAE_window/output/ViTAE_Window_NoShift_12_basic_stages4_14_224/epoch40/ViTAE_Window_NoShift_12_basic_stages4_14/default/ckpt.pth' elif self.args.mode == 'rsp_100':
pretrained = 'D:\\codes\\ViTAE-Transformer-Remote-Sensing\\ChangeDetection\\weights\\levir\\3\\bit-rsp-vitaev2-s-levir-ckpt.pth'
else:
raise NotImplementedError
if isinstance(pretrained, str):
ckpt = torch.load(pretrained, map_location='cpu')
if 'state_dict' in ckpt:
_state_dict = ckpt['state_dict']
用下载那个权重bit-rsp-vitaev2-s-levir-ckpt.pth 训练时if 'state_dict' in ckpt: 报错了 提示:
Traceback (most recent call last):
File "train-tmp.py", line 103, in
仓库主页
你base_model.py文件中有好多预训练权重路径,
if self.args.mode == 'imp':
pretrained = '../pretrain_model/ViTAE_Window_NoShift_12_basic_stages4_14_best.pth.tar'
elif self.args.mode == 'rsp_40':
pretrained = '../VitAE_window/output/ViTAE_Window_NoShift_12_basic_stages4_14_224/epoch40/ViTAE_Window_NoShift_12_basic_stages4_14/default/ckpt.pth'
elif self.args.mode == 'rsp_100':
# pretrained = '../VitAE_window/output/ViTAE_Window_NoShift_12_basic_stages4_14_224/epoch100/ViTAE_Window_NoShift_12_basic_stages4_14/default/ckpt.pth'
pretrained = 'D:\\codes\\ViTAE-Transformer-Remote-Sensing\\ChangeDetection\\weights\\levir\\3\\bit-rsp-vitaev2-s-levir-ckpt.pth'
else:
raise NotImplementedError
我添加了下载的 pretrained = 'D:\codes\ViTAE-Transformer-Remote-Sensing\ChangeDetection\weights\levir\3\bit-rsp-vitaev2-s-levir-ckpt.pth'
不是那个变化监测的主页,是总的主页
变化检测分割之类的任务文件夹里边的模型是训练好的模型,不是预训练模型 预训练模型在本仓库主页,关于vitae,遥感这个仓库这里只提供了rsp-vitaev2-s-e100的 imp的在同项目的其他仓库中:https://github.com/ViTAE-Transformer/ViTAE-Transformer/tree/main/Image-Classification
项目
谢谢,rsp-vitaev2-s-e100 这个可以训起来了。 但是 if self.args.mode == 'imp': pretrained = '../pretrain_model/ViTAE_Window_NoShift_12_basic_stages4_14_best.pth.tar' 这个找不到时对应哪一个,仓库中:https://github.com/ViTAE-Transformer/ViTAE-Transformer/tree/main/Image-Classification有好多个,帮忙指点下,谢谢
ViTAEv2-S那个
ViTAEv2-S那个
好了,可以了。
elif self.args.mode == 'rsp_40':
pretrained = '../VitAE_window/output/ViTAE_Window_NoShift_12_basic_stages4_14_224/epoch40/ViTAE_Window_NoShift_12_basic_stages4_14/default/ckpt.pth' 这个是对应那个?
这个不需要了,已经有epoch100的了,文章里边的实验已经表明40的不如100的,所以我就没放
这个不需要了,已经有epoch100的了,文章里边的实验已经表明40的不如100的,所以我就没放
ok,好的,谢谢。
你好!我在训练是发生找不到权重 VitAE_window/output/ViTAE_Window_NoShift_12_basic_stages4_14_224/epoch100/ViTAE_Window_NoShift_12_basic_stages4_14/default/ckpt.pth