simplify kwargs logic for equations
This commit is contained in:
committed by
Giovanni Canali
parent
684d691b78
commit
7469543499
@@ -190,13 +190,9 @@ class PINNInterface(SupervisedSolverInterface, metaclass=ABCMeta):
|
||||
:return: The residual of the solution of the model.
|
||||
:rtype: LabelTensor
|
||||
"""
|
||||
try:
|
||||
residual = equation.residual(samples, self.forward(samples))
|
||||
except TypeError:
|
||||
# this occurs when the function has three inputs (inverse problem)
|
||||
residual = equation.residual(
|
||||
samples, self.forward(samples), self._params
|
||||
)
|
||||
residual = equation.residual(
|
||||
samples, self.forward(samples), self._params
|
||||
)
|
||||
return residual
|
||||
|
||||
def _residual_loss(self, samples, equation):
|
||||
|
||||
Reference in New Issue
Block a user