[Error] AttributeError: 'Conv4d' object has no attribute 'weight'
AttributeError Traceback (most recent call last) Cell In[1], line 29 25 else: 26 # Initialize patch2pix matcher 27 args = Namespace(io_thres=0.25, imsize=1024, ksize=2, 28 ckpt='../pretrained/patch2pix_pretrained.pth') ---> 29 matcher = init_patch2pix_matcher(args) 33 # Visualize matches on D2Net example pairs 34 for i in range(1, 4):
File ~/CodesWorld/Codes/patch2pix/examples/../utils/eval/model_helper.py:11, in init_patch2pix_matcher(args)
10 def init_patch2pix_matcher(args):
---> 11 net = load_model(args.ckpt, method='patch2pix')
12 matcher = lambda imq, imr: estimate_matches(net, imq, imr,
13 ksize=args.ksize,
14 io_thres=args.io_thres,
15 eval_type='fine',
16 imsize=args.imsize)
17 return matcher
File ~/CodesWorld/Codes/patch2pix/examples/../utils/eval/model_helper.py:60, in load_model(ckpt_path, method, lprint) 58 else: 59 lprint('Wrong method name.') ---> 60 net = Patch2Pix(config) ... 1613 return modules[name] -> 1614 raise AttributeError("'{}' object has no attribute '{}'".format( 1615 type(self).name, name))
AttributeError: 'Conv4d' object has no attribute 'weight'
I believe it was because you used pytorch2. Can u pull and try again?
您好,我在使用pytorch2.4也同样出现了这个问题,您之前针对torch2的更新好像没有起作用。
@GrumpyZhou