From 8357754abe143c8073196c70f561911a462db395 Mon Sep 17 00:00:00 2001 From: raccoonliukai <903896015@qq.com> Date: Mon, 9 Sep 2019 22:02:18 +0800 Subject: [PATCH] fix(encoder): fix PCAEncoder mean from fp64 to fp32 --- gnes/encoder/numeric/pca.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnes/encoder/numeric/pca.py b/gnes/encoder/numeric/pca.py index 693a1d62..14b893d9 100644 --- a/gnes/encoder/numeric/pca.py +++ b/gnes/encoder/numeric/pca.py @@ -48,7 +48,7 @@ def train(self, vecs: np.ndarray, *args, **kwargs) -> None: self.pca.partial_fit(vecs) self.pca_components = np.transpose(self.pca.components_) - self.mean = self.pca.mean_ + self.mean = self.pca.mean_.astype('float32') @train_required @batching