From 3e123e35a93157dcb71ca80d53e54e26d11b6487 Mon Sep 17 00:00:00 2001 From: "wangnan39@huawei.com" Date: Tue, 24 Nov 2020 15:56:05 +0800 Subject: [PATCH] fix bug of can not change activate after define conv2d --- mindspore/nn/cell.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mindspore/nn/cell.py b/mindspore/nn/cell.py index bc80cfb8c9..777da7ef91 100755 --- a/mindspore/nn/cell.py +++ b/mindspore/nn/cell.py @@ -401,6 +401,8 @@ class Cell(Cell_): if self._auto_prefix: value.update_parameters_name(name + '.') cells[name] = value + if hasattr(self, '_cell_init_args'): + self.cell_init_args += str({name: value}) elif params and name in params: if isinstance(value, Tensor) and self._params[name] is not None: self._params[name].set_data(value)