From b12fad86c78da06ad54e3088a84f660019d7a369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A9=B9=E7=8E=89=E6=A2=81?= Date: Thu, 30 Oct 2025 08:03:23 +0000 Subject: [PATCH 1/7] rename mindscience/models/neural_operator/m2k.py to mindscience/models/neural_operator/_m2k.py. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 詹玉梁 --- mindscience/models/neural_operator/{m2k.py => _m2k.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename mindscience/models/neural_operator/{m2k.py => _m2k.py} (100%) diff --git a/mindscience/models/neural_operator/m2k.py b/mindscience/models/neural_operator/_m2k.py similarity index 100% rename from mindscience/models/neural_operator/m2k.py rename to mindscience/models/neural_operator/_m2k.py -- Gitee From 86aa907aac59147ee9e7cc2b5e2f4314f5ed2dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A9=B9=E7=8E=89=E6=A2=81?= Date: Thu, 30 Oct 2025 08:27:58 +0000 Subject: [PATCH 2/7] update mindscience/models/neural_operator/pdenet.py. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 詹玉梁 --- mindscience/models/neural_operator/pdenet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindscience/models/neural_operator/pdenet.py b/mindscience/models/neural_operator/pdenet.py index 3c0550af1..ddf3bdbd1 100644 --- a/mindscience/models/neural_operator/pdenet.py +++ b/mindscience/models/neural_operator/pdenet.py @@ -17,7 +17,7 @@ import mindspore.numpy as ms_np import mindspore.common.dtype as mstype from mindspore import nn, ops, Parameter -from .m2k import _M2K +from ._m2k import _M2K from ...utils.check_func import check_param_type __all__ = ['PDENet'] -- Gitee From 0ced574b6a62de4222deeaa7ea470bbca63964a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A9=B9=E7=8E=89=E6=A2=81?= Date: Thu, 30 Oct 2025 08:40:38 +0000 Subject: [PATCH 3/7] update mindscience/models/neural_operator/pdenet.py. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 詹玉梁 --- mindscience/models/neural_operator/pdenet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindscience/models/neural_operator/pdenet.py b/mindscience/models/neural_operator/pdenet.py index ddf3bdbd1..a11536ac0 100644 --- a/mindscience/models/neural_operator/pdenet.py +++ b/mindscience/models/neural_operator/pdenet.py @@ -17,7 +17,7 @@ import mindspore.numpy as ms_np import mindspore.common.dtype as mstype from mindspore import nn, ops, Parameter -from ._m2k import _M2K +from .internal_m2k import _M2K from ...utils.check_func import check_param_type __all__ = ['PDENet'] -- Gitee From 20cf033828a5d395b8b816ff3afeefd8ee070d79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A9=B9=E7=8E=89=E6=A2=81?= Date: Thu, 30 Oct 2025 08:41:51 +0000 Subject: [PATCH 4/7] rename _m2k.py to internal_m2k.py. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 詹玉梁 --- mindscience/models/neural_operator/{_m2k.py => internal_m2k.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename mindscience/models/neural_operator/{_m2k.py => internal_m2k.py} (100%) diff --git a/mindscience/models/neural_operator/_m2k.py b/mindscience/models/neural_operator/internal_m2k.py similarity index 100% rename from mindscience/models/neural_operator/_m2k.py rename to mindscience/models/neural_operator/internal_m2k.py -- Gitee From 3b1a0d83dfb6f19b5137f2760742f33cb3d17ac2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A9=B9=E7=8E=89=E6=A2=81?= Date: Thu, 30 Oct 2025 08:54:45 +0000 Subject: [PATCH 5/7] update mindscience/models/neural_operator/internal_m2k.py. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 詹玉梁 --- mindscience/models/neural_operator/internal_m2k.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindscience/models/neural_operator/internal_m2k.py b/mindscience/models/neural_operator/internal_m2k.py index d502eddb9..2e603003c 100644 --- a/mindscience/models/neural_operator/internal_m2k.py +++ b/mindscience/models/neural_operator/internal_m2k.py @@ -24,7 +24,7 @@ from mindspore.numpy import tensordot class _M2K(nn.Cell): '''M2K module''' def __init__(self, shape): - super(_M2K, self).__init__() + super().__init__() self._shape = shape self._ndim = len(shape) self._m = [] -- Gitee From 8b2ec6e7b5beda0725c47cb028c721eaa96620b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A9=B9=E7=8E=89=E6=A2=81?= Date: Thu, 30 Oct 2025 08:55:55 +0000 Subject: [PATCH 6/7] update mindscience/models/neural_operator/pdenet.py. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 詹玉梁 --- mindscience/models/neural_operator/pdenet.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mindscience/models/neural_operator/pdenet.py b/mindscience/models/neural_operator/pdenet.py index a11536ac0..4f872b250 100644 --- a/mindscience/models/neural_operator/pdenet.py +++ b/mindscience/models/neural_operator/pdenet.py @@ -143,6 +143,7 @@ class PDENet(nn.Cell): return self.coe_param def _one_step_forward(self, x): + """Perform one forward step of the PDE solver.""" if self.periodic: x = self._periodicpad(x) @@ -180,6 +181,7 @@ class PDENet(nn.Cell): return out def _init_moment(self): + """Initialize the momentum variables for the PDE network.""" raw_moment = ms_np.zeros((self.num_filter, self.kernel_size, self.kernel_size)) mask = ms_np.ones((self.num_filter, self.kernel_size, self.kernel_size)) scale = ms_np.ones((self.num_filter,)) @@ -206,6 +208,7 @@ class PDENet(nn.Cell): self.moment = Parameter(raw_moment) def _periodicpad(self, x): + """Apply periodic padding to the input tensor.""" cast = ops.Cast() x = cast(x, self.dtype) x_dim = len(x.shape) -- Gitee From ed794b9531ead46861e0e84d1c5891eb79e5d9c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A9=B9=E7=8E=89=E6=A2=81?= Date: Thu, 30 Oct 2025 08:59:49 +0000 Subject: [PATCH 7/7] update mindscience/models/neural_operator/pdenet.py. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 詹玉梁 --- mindscience/models/neural_operator/pdenet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mindscience/models/neural_operator/pdenet.py b/mindscience/models/neural_operator/pdenet.py index 4f872b250..07a75a8a4 100644 --- a/mindscience/models/neural_operator/pdenet.py +++ b/mindscience/models/neural_operator/pdenet.py @@ -143,7 +143,7 @@ class PDENet(nn.Cell): return self.coe_param def _one_step_forward(self, x): - """Perform one forward step of the PDE solver.""" + """Perform one forward step of the PDE solver.""" if self.periodic: x = self._periodicpad(x) @@ -181,7 +181,7 @@ class PDENet(nn.Cell): return out def _init_moment(self): - """Initialize the momentum variables for the PDE network.""" + """Initialize the momentum variables for the PDE network.""" raw_moment = ms_np.zeros((self.num_filter, self.kernel_size, self.kernel_size)) mask = ms_np.ones((self.num_filter, self.kernel_size, self.kernel_size)) scale = ms_np.ones((self.num_filter,)) @@ -208,7 +208,7 @@ class PDENet(nn.Cell): self.moment = Parameter(raw_moment) def _periodicpad(self, x): - """Apply periodic padding to the input tensor.""" + """Apply periodic padding to the input tensor.""" cast = ops.Cast() x = cast(x, self.dtype) x_dim = len(x.shape) -- Gitee