From 20a419c718d756fff8e75daf83e933bfe66c9e87 Mon Sep 17 00:00:00 2001 From: wangshuide2020 <7511764+wangshuide2020@user.noreply.gitee.com> Date: Fri, 22 Jan 2021 14:32:15 +0800 Subject: [PATCH] update the release notes about the change of nn.LinSpace and ops.LinSpace interface. --- RELEASE.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/RELEASE.md b/RELEASE.md index 059623532a..12dccf126e 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -42,6 +42,46 @@ Previously the kernel size and pad mode attrs of pooling ops are named "ksize" a +###### `nn.LinSpace` ([!9494](https://gitee.com/mindspore/mindspore/pulls/9494)) has been removed and modify `ops.LinSpace` ([!8920](https://gitee.com/mindspore/mindspore/pulls/8920)) + +The `nn.LinSpace` interface only support passing the value by args previously. For the convenience, we provided enhancive `ops.LinSpace` interface, which support passing the value by the inputs at the latest version. So there is no need for `nn.LinSpace`. + +
1.1.0 | 1.1.1 | +
+ +```python +>>> from mindspore import nn +>>> +>>> start = 1 +>>> stop = 10 +>>> num = 5 +>>> linspace = nn.LinSpace(start, stop, num) +>>> output = linspace() +``` + + | ++ +```python +>>> import mindspore +>>> from mindspore import Tensor +>>> from mindspore import ops +>>> +>>> linspace = ops.LinSpace() +>>> start = Tensor(1, mindspore.float32) +>>> stop = Tensor(10, mindspore.float32) +>>> num = 5 +>>> output = linspace(start, stop, num) +``` + + | +