From 2db33451f0b10b8c86374c842f09b2d40f070de9 Mon Sep 17 00:00:00 2001
From: liutongtong <liutongtong9@huawei.com>
Date: Wed, 3 Aug 2022 16:47:16 +0800
Subject: [PATCH] clean code

---
 RELEASE.md                                           | 2 +-
 RELEASE_CN.md                                        | 2 +-
 mindspore/ccsrc/transform/graph_ir/transform_util.cc | 4 ++--
 mindspore/python/mindspore/nn/cell.py                | 3 +++
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/RELEASE.md b/RELEASE.md
index 8221a39ff12..b99837cd1c0 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -10,7 +10,7 @@
 
 #### FrontEnd
 
-- [BETA] Add `mindspore.Model.fit` API, add `mindspore.callback.EarlyStopping` and `mindspore.callback.ReduceLROnPlateau` in Callback.
+- [BETA] Add `mindspore.Model.fit` API, add `mindspore.train.callback.EarlyStopping` and `mindspore.train.callback.ReduceLROnPlateau` in Callback.
 - [BETA] Support custom operator implemented by Julia.
 - [BETA] Support custom operator implemented by MindSpore Hybrid DSL.
 - [STABLE] The export() interface supports the export of a model using a custom encryption algorithm, and the load() interface supports the import of a model using a custom decryption algorithm.
diff --git a/RELEASE_CN.md b/RELEASE_CN.md
index f0d503c7a24..cb44c630608 100644
--- a/RELEASE_CN.md
+++ b/RELEASE_CN.md
@@ -10,7 +10,7 @@
 
 #### FrontEnd
 
-- [BETA]  提供`mindspore.Model.fit` API,增加两种callback方法 `mindspore.callback.EarlyStopping` 和 `mindspore.callback.ReduceLROnPlateau`。
+- [BETA]  提供`mindspore.Model.fit` API,增加两种callback方法 `mindspore.train.callback.EarlyStopping` 和 `mindspore.train.callback.ReduceLROnPlateau`。
 - [BETA] 自定义算子支持Julia算子。
 - [BETA] 自定义算子支持Hybrid DSL算子。
 - [STABLE] export()接口支持自定义加密算法导出模型,load()接口支持自定义解密算法导入模型。
diff --git a/mindspore/ccsrc/transform/graph_ir/transform_util.cc b/mindspore/ccsrc/transform/graph_ir/transform_util.cc
index 378abe3ca4c..f0e62e5c36e 100644
--- a/mindspore/ccsrc/transform/graph_ir/transform_util.cc
+++ b/mindspore/ccsrc/transform/graph_ir/transform_util.cc
@@ -219,7 +219,7 @@ GeTensorPtr ConvertStringTensor(const MeTensorPtr &tensor, const std::string &fo
       std::string string_to_add(string_element, string_length);
       (void)string_vector.emplace_back(string_to_add);
     }
-    delete string_element;
+    delete[] string_element;
     string_element = nullptr;
     tensor_ptr = make_shared<GeTensor>(*desc);
     (void)tensor_ptr->SetData(string_vector);
@@ -236,7 +236,7 @@ GeTensorPtr ConvertStringTensor(const MeTensorPtr &tensor, const std::string &fo
     std::string string_to_add(string_element, string_length);
     tensor_ptr = make_shared<GeTensor>(*desc);
     (void)tensor_ptr->SetData(string_to_add);
-    delete string_element;
+    delete[] string_element;
     string_element = nullptr;
   }
   return tensor_ptr;
diff --git a/mindspore/python/mindspore/nn/cell.py b/mindspore/python/mindspore/nn/cell.py
index ffbb9865b10..4d19a1c460f 100755
--- a/mindspore/python/mindspore/nn/cell.py
+++ b/mindspore/python/mindspore/nn/cell.py
@@ -1544,6 +1544,9 @@ class Cell(Cell_):
             >>>
             >>> net = nn.Conv2d(120, 240, 4, has_bias=False, weight_init='normal')
             >>> net.to_float(mstype.float16)
+
+        Supported Platforms:
+        ``Ascend`` ``GPU`` ``CPU``
         """
         if dst_type not in (mstype.float16, mstype.float32):
             raise ValueError("For 'to_float', the argument 'dst_type' must be float32 or float16, "