msracver / FCIS

Fully Convolutional Instance-aware Semantic Segmentation
MIT License
1.57k stars 414 forks source link

TypeError: _update_params_on_kvstore() takes exactly 4 arguments (3 given) #135

Closed Danee-wawawa closed 6 years ago

Danee-wawawa commented 6 years ago

Hi, thank you for sharing the code. When I run the training program:

python experiments/fcis/fcis_end2end_train_test.py --cfg experiments/fcis/cfgs/resnet_v1_101_vocSDS_fcis_end2end.yaml

The error :

Traceback (most recent call last): File "experiments/fcis/fcis_end2end_train_test.py", line 13, in train_end2end.main() File "experiments/fcis/../../fcis/train_end2end.py", line 181, in main config.TRAIN.lr, config.TRAIN.lr_step) File "experiments/fcis/../../fcis/train_end2end.py", line 173, in train_net arg_params=arg_params, aux_params=aux_params, begin_epoch=begin_epoch, num_epoch=end_epoch) File "experiments/fcis/../../fcis/core/module.py", line 955, in fit self.update() File "experiments/fcis/../../fcis/core/module.py", line 1037, in update self._curr_module.update() File "experiments/fcis/../../fcis/core/module.py", line 573, in update self._kvstore) TypeError: _update_params_on_kvstore() takes exactly 4 arguments (3 given)

Your answer will be appreciated.

Danee-wawawa commented 6 years ago

The problem has been solved.

Change line 570--573 in ./fcis/core/module.py to the following:

if self._update_on_kvstore: try: _update_params_on_kvstore(self._exec_group.param_arrays, self._exec_group.grad_arrays, self._kvstore) except: _update_params_on_kvstore(self._exec_group.param_arrays, self._exec_group.grad_arrays, self._kvstore, param_names=self._exec_group.param_names)