🎨 Format Python code with psf/black
This commit is contained in:
@@ -158,7 +158,11 @@ class RBAPINN(PINN):
|
|||||||
residual = self.compute_residual(samples=samples, equation=equation)
|
residual = self.compute_residual(samples=samples, equation=equation)
|
||||||
cond = self.current_condition_name
|
cond = self.current_condition_name
|
||||||
|
|
||||||
r_norm = self.eta * torch.abs(residual) / (torch.max(torch.abs(residual))+1e-12)
|
r_norm = (
|
||||||
|
self.eta
|
||||||
|
* torch.abs(residual)
|
||||||
|
/ (torch.max(torch.abs(residual)) + 1e-12)
|
||||||
|
)
|
||||||
self.weights[cond] = (self.gamma * self.weights[cond] + r_norm).detach()
|
self.weights[cond] = (self.gamma * self.weights[cond] + r_norm).detach()
|
||||||
|
|
||||||
loss_value = self._vectorial_loss(
|
loss_value = self._vectorial_loss(
|
||||||
|
|||||||
Reference in New Issue
Block a user