Open PerthyChen opened 6 years ago
delete “allow_extra=allow_extra”,it's work。。。
@mawangyi thanks, I got it.the error comes out due to the mxnet code is not really the same as the code that reposity recommand,now i delete it and the model works.
What if the file is read-only? @mawangyi @PerthyChen
I mean the file "base_module.py", it's read-only @mawangyi @PerthyChen
@niuhaoyu16 .The optional parameter 'allow_extra=allow_extra' is recently introduced to mxnet. This FCIS implementation is based on an older version of mxnet. I think you could simply add 'allow_extra=True' to the 'init_params' function in MutableModule and other related code. I add 'allow_extra=True to almost everywhere. :) It works for me.
When I train on SBD dataset,FCIS can tain for a few BACTHs(11200 batchs).But after one epoch seems to finish,it shows TypeError: init_params() got an unexpected keyword argument 'allow_extra'. The error can be localized at the function self.set_params(arg_params, aux_params). I can assume that it is because the format of arg_params or aux_params is wrong that the ERROR comes out.But the dataset is downloaded on the website that this reposity recommand. Have you met this error yet?
# 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 975, in fit
self.set_params(arg_params, aux_params)
File "/usr/local/lib/python2.7/dist-packages/mxnet-0.12.0-py2.7.egg/mxnet/module/base_module.py", line 652, in set_params
allow_extra=allow_extra)
TypeError: init_params() got an unexpected keyword argument 'allow_extra'
Your answer will be appreciated.