這是train.py的相關代碼
trainer = pl.Trainer(max_epochs=conf['training']['epochs'], checkpoint_callback=checkpoint, resume_from_checkpoint=best_model_path, early_stop_callback=early_stopping, default_save_path=exp_dir, gpus=gpus, distributed_backend='dp', train_percent_check=1.0, # Useful for fast experiment gradient_clip_val=5.) trainer.fit(system)
這是env_vars_connector.py的代碼:
def _defaults_from_env_vars(fn: Callable) -> Callable: """Decorator for :class:`~pytorch_lightning.trainer.trainer.Trainer` methods for which input arguments should be moved automatically to the correct device.""" @wraps(fn) def insert_env_defaults(self, *args, **kwargs): cls = self.__class__ # get the class if args: # inace any args passed move them to kwargs # parse only the argument names cls_arg_names = [arg[0] for arg in get_init_arguments_and_types(cls)] # convert args to kwargs kwargs.update(dict(zip(cls_arg_names, args))) env_variables = vars(parse_env_variables(cls)) # update the kwargs by env variables kwargs = dict(list(env_variables.items()) + list(kwargs.items())) # all args were already moved to kwargs return fn(self, **kwargs) return insert_env_defaults
File "train.py", line 93, in main trainer = pl.Trainer(max_epochs=conf['training']['epochs'], File "C:\Users\SASPL-1\anaconda3\envs\zx_38\lib\site-packages\pytorch_lightning\trainer\connectors\env_vars_connector.py", line 38, in insert_env_defaults return fn(self, **kwargs)TypeError: __init__() got an unexpected keyword argument 'early_stop_callback'
請問這是什麼問題呢??