opt = deepcopy(kwargs)
// Look for model direcory and model file names
model_dir = opt.get("model_dir", None)
model_file = opt.get("model_file", "ner_model.ckpt") // default name is ner_model
if model_dir is None:
model_dir = USR_PATH
// Set these arguments to use self.model_path_ property from
// Serializable class (inherited from Trainable)
self._model_dir = model_dir
self._model_file = model_file
// Find all input parameters of the network init
network_parameter_names = list(inspect.signature(NerNetwork.__init__).parameters)
After Change
super().__init__(**kwargs)
opt = deepcopy(kwargs)
vocabs = opt.pop("vocabs")
opt.update(vocabs)
// Find all input parameters of the network init
network_parameter_names = list(inspect.signature(NerNetwork.__init__).parameters)