Skip to content

Commit bfb9928

Browse files
fix residual stack (#772)
1 parent 80dccbc commit bfb9928

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pina/_src/equation/system_equation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,12 @@ def residual(self, input_, output_, params_=None):
105105
self.to(input_.device)
106106

107107
# Compute the residual for each equation
108-
residual = torch.hstack(
108+
residual = torch.cat(
109109
[
110110
equation.residual(input_, output_, params_)
111111
for equation in self.equations
112-
]
112+
],
113+
dim=-1,
113114
)
114115

115116
# Skip reduction if not specified

0 commit comments

Comments
 (0)