From 4f0c7a8c454c8ace55dfa80084e18d288173aeea Mon Sep 17 00:00:00 2001 From: w30006229 <877518222@qq.com> Date: Mon, 14 Sep 2020 17:45:54 +0800 Subject: [PATCH] modified cell.py,solved the problem in yolov3_darknet53(batch_size=16) --- mindspore/nn/cell.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mindspore/nn/cell.py b/mindspore/nn/cell.py index 9c3c95636a..8d1bc884a8 100755 --- a/mindspore/nn/cell.py +++ b/mindspore/nn/cell.py @@ -786,8 +786,8 @@ class Cell(Cell_): for par_name, par in params: if par.inited_param is not None: par = par.inited_param - if par is not None and par not in params_set: - params_set.add(par) + if par is not None and id(par) not in params_set: + params_set.add(id(par)) par_new_name = par_name if cell_name: par_new_name = cell_name + '.' + par_new_name