Skip to content

AttributeError: 'PARCv2' object has no attribute 'check' #85

@stephenbaek

Description

@stephenbaek

AttributeError Traceback (most recent call last)
Cell In[7], line 49
46 criterion = torch.nn.L1Loss().cuda()
48 # Initialize the PARCv2 model with the differentiator, integrator, and loss function
---> 49 model = PARCv2(diff_ns, ns_int, criterion).cuda()
51 # Set up the optimizer (Adam is a popular choice for adaptive learning rate optimization)
52 optimizer = Adam(model.parameters(), lr=1e-5)

File ~\codes\PARCtorch\PARCtorch\PARCv2.py:55, in PARCv2.init(self, differentiator, integrator, loss, **kwargs)
53 if loss is None:
54 loss = torch.nn.L1Loss().cuda()
---> 55 super(PARCv2, self).init(differentiator, integrator, loss, **kwargs)

File ~\codes\PARCtorch\PARCtorch\model.py:25, in PARC.init(self, differentiator, integrator, loss, **kwargs)
23 self.integrator = integrator
24 self.loss = loss
---> 25 check = self.check()
26 self.check_msg(check)

File c:\Users\mwn4yc\Anaconda3\envs\parc\lib\site-packages\torch\nn\modules\module.py:1688, in Module.getattr(self, name)
1686 if name in modules:
1687 return modules[name]
-> 1688 raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'")

AttributeError: 'PARCv2' object has no attribute 'check'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions