From 59fc19798f13a1d475c4758c894639033a5a4b0e Mon Sep 17 00:00:00 2001 From: ndem0 Date: Mon, 26 Aug 2024 12:14:32 +0000 Subject: [PATCH] :art: Format Python code with psf/black --- pina/model/layers/orthogonal.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pina/model/layers/orthogonal.py b/pina/model/layers/orthogonal.py index b7085e0..0edcace 100644 --- a/pina/model/layers/orthogonal.py +++ b/pina/model/layers/orthogonal.py @@ -37,12 +37,12 @@ class OrthogonalBlock(torch.nn.Module): ) result = torch.zeros_like(X) - + # normalize first basis X_0 = torch.select(X, self.dim, 0) result_0 = torch.select(result, self.dim, 0) result_0 += X_0 / torch.norm(X_0) - + # iterate over the rest of the basis with Gram-Schmidt for i in range(1, X.shape[self.dim]): v = torch.select(X, self.dim, i) @@ -54,5 +54,5 @@ class OrthogonalBlock(torch.nn.Module): ) * torch.select(result, self.dim, j) result_i = torch.select(result, self.dim, i) result_i += v / torch.norm(v) - + return result