Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

update pytorch ci matrix 1.10.2 and 1.11.0 (#1771)

Edgar Riba0d4f41eb8ed6
diff --git a/.github/workflows/tests_cpu.yml b/.github/workflows/tests_cpu.yml
index d2dba0ee1..43ee253d7 100644
--- a/.github/workflows/tests_cpu.yml
+++ b/.github/workflows/tests_cpu.yml
@@ -16,8 +16,8 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
- python-version: [3.6, 3.8, 3.9]
- pytorch-version: [1.8.1, 1.9.1, 1.10.1]
+ python-version: [3.7, 3.8, 3.9]
+ pytorch-version: [1.8.1, 1.9.1, 1.10.2, 1.11.0]
steps:
- uses: actions/checkout@v2
- name: Setup conda dependencies
diff --git a/kornia/enhance/zca.py b/kornia/enhance/zca.py
index 446e9bdbc..d50ca4722 100644
--- a/kornia/enhance/zca.py
+++ b/kornia/enhance/zca.py
@@ -82,6 +82,10 @@ class ZCAWhitening(nn.Module):
self.fitted = False
+ self.mean_vector: torch.Tensor
+ self.transform_matrix: torch.Tensor
+ self.transform_inv: Optional[torch.Tensor]
+
def fit(self, x: torch.Tensor):
r"""Fit ZCA whitening matrices to the data.
@@ -96,9 +100,9 @@ class ZCAWhitening(nn.Module):
T, mean, T_inv = zca_mean(x, self.dim, self.unbiased, self.eps, self.compute_inv)
self.mean_vector = mean
- self.transform_matrix: torch.Tensor = T
+ self.transform_matrix = T
if T_inv is None:
- self.transform_inv: Optional[torch.Tensor] = torch.empty([0])
+ self.transform_inv = torch.empty([0])
else:
self.transform_inv = T_inv