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

[Error] AttributeError: 'Conv4d' object has no attribute 'weight' #17

Open
Ever-Bright-V opened this issue May 31, 2024 · 3 comments
Open

Comments

@Ever-Bright-V
Copy link

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'

@GrumpyZhou
Copy link
Owner

I believe it was because you used pytorch2. Can u pull and try again?

@Zsudoku
Copy link

Zsudoku commented Sep 26, 2024

您好,我在使用pytorch2.4也同样出现了这个问题,您之前针对torch2的更新好像没有起作用。

@Zsudoku
Copy link

Zsudoku commented Sep 26, 2024

@GrumpyZhou

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

3 participants