!12233 remove the return of func 'append()' of SequentialCell

From: @yepei6
Reviewed-by: @kisnwang
Signed-off-by:
This commit is contained in:
mindspore-ci-bot 2021-02-08 14:37:16 +08:00 committed by Gitee
commit 20905d452f
1 changed files with 0 additions and 2 deletions

View File

@ -167,7 +167,6 @@ class SequentialCell(Cell):
if _valid_cell(cell): if _valid_cell(cell):
self._cells[str(len(self))] = cell self._cells[str(len(self))] = cell
self.cell_list = list(self._cells.values()) self.cell_list = list(self._cells.values())
return self
def construct(self, input_data): def construct(self, input_data):
for cell in self.cell_list: for cell in self.cell_list:
@ -277,7 +276,6 @@ class CellList(_CellListBase, Cell):
"""Appends a given cell to the end of the list.""" """Appends a given cell to the end of the list."""
if _valid_cell(cell): if _valid_cell(cell):
self._cells[str(len(self))] = cell self._cells[str(len(self))] = cell
return self
def set_grad(self, flag=True): def set_grad(self, flag=True):
self.requires_grad = flag self.requires_grad = flag