diff --git a/mindtorch/nn/modules/activation.py b/mindtorch/nn/modules/activation.py index b30a6604d..3602e3946 100644 --- a/mindtorch/nn/modules/activation.py +++ b/mindtorch/nn/modules/activation.py @@ -614,7 +614,7 @@ def forward(self, input: Tensor) -> Tensor: """ Runs the forward pass. """ - return F.elu(input, self.alpha, self.inplace) + return F.elu(input, self.alpha) def extra_repr(self) -> str: """ diff --git a/mindtorch/ops/array.py b/mindtorch/ops/array.py index a4ee513c4..8ab976bdf 100644 --- a/mindtorch/ops/array.py +++ b/mindtorch/ops/array.py @@ -767,7 +767,7 @@ def _slice_helper(tensor, slice_spec, do_update=False, updates=None): if s.stop is not None: stop = s.stop if stop == -1: - stop = tensor.shape[index] + stop = tensor.shape[index] - 1 end.append(stop) else: end.append(0) @@ -1069,7 +1069,6 @@ def strided_slice_update(x, begin, end, strides, updates, begin_mask=0, end_mask=0, ellipsis_mask=0, new_axis_mask=0, shrink_axis_mask=0): - x_shape = x.shape ndim = len(x_shape) diff --git a/setup.py b/setup.py index f66649939..3a05ab7d0 100644 --- a/setup.py +++ b/setup.py @@ -64,7 +64,7 @@ def run(self): _create_namespace_links() # 安装后创建链接 -version = '0.5.0rc4' +version = '0.5.0' cur_dir = os.path.dirname(os.path.realpath(__file__)) pkg_dir = os.path.join(cur_dir, 'build')