From 6fdd9c30bd7a9b4805479eee6773caf207eeb033 Mon Sep 17 00:00:00 2001 From: mengqinghe0909 Date: Mon, 31 Mar 2025 21:50:14 +0800 Subject: [PATCH] modified to fix sno3d train loss nan bug --- .../data_driven/navier_stokes/sno3d/src/utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MindFlow/applications/data_driven/navier_stokes/sno3d/src/utils.py b/MindFlow/applications/data_driven/navier_stokes/sno3d/src/utils.py index 29de11016..6867cdd23 100644 --- a/MindFlow/applications/data_driven/navier_stokes/sno3d/src/utils.py +++ b/MindFlow/applications/data_driven/navier_stokes/sno3d/src/utils.py @@ -21,8 +21,8 @@ from scipy.interpolate import interp2d import matplotlib import matplotlib.pyplot as plt import matplotlib.animation as animation -from mindspore import jit_class, Tensor -from mindflow.loss import RelativeRMSELoss +from mindspore import jit_class, ops +from mindflow.core import RelativeRMSELoss from mindflow.utils import print_log from mindflow.cell import poly_data @@ -33,8 +33,8 @@ class UnitGaussianNormalizer(): def __init__(self, x, eps=0.00001): super(UnitGaussianNormalizer, self).__init__() - self.mean = Tensor.mean(x) - self.std = Tensor.std(x) + self.mean = ops.mean(x) + self.std = ops.std(x) self.eps = eps def encode(self, x): -- Gitee