From 6e29d7af5632d0151337ecdee7ac5991136e34aa Mon Sep 17 00:00:00 2001 From: eric-haibin-lin Date: Sat, 10 Jun 2017 16:30:11 +0000 Subject: [PATCH] fix lint --- python/mxnet/model.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/python/mxnet/model.py b/python/mxnet/model.py index b90500d4a9c5..7c67a160c145 100644 --- a/python/mxnet/model.py +++ b/python/mxnet/model.py @@ -101,10 +101,10 @@ def _update_params_on_kvstore(param_arrays, grad_arrays, kvstore, index = index if name not in kvstore.name2idx else kvstore.name2idx[name] # cast storage type if stype doesn't match if name in stype_dict: - for i, grad in enumerate(grad_list): + for j, grad in enumerate(grad_list): stype = stype_dict[name] - if grad_list[i].storage_type != stype: - grad_list[i] = nd.cast_storage(grad, stype) + if grad_list[j].storage_type != stype: + grad_list[j] = nd.cast_storage(grad, stype) # push gradient, priority is negative index kvstore.push(index, grad_list, priority=-index) # pull back the weights @@ -120,10 +120,10 @@ def _update_params(param_arrays, grad_arrays, updater, num_device, continue # cast storage type if stype doesn't match if param_names is not None and param_names[i] in stype_dict: - for i, grad in enumerate(grad_list): + for j, grad in enumerate(grad_list): stype = stype_dict[param_names[i]] - if grad_list[i].storage_type != stype: - grad_list[i] = nd.cast_storage(grad, stype) + if grad_list[j].storage_type != stype: + grad_list[j] = nd.cast_storage(grad, stype) index = i if kvstore: if param_names is not None: