Skip to content

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

@Ever-Bright-V

Description

@Ever-Bright-V

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions