Closed KaichaoLiang closed 1 year ago
We can't reproduce your error, maybe you need to check your env? @KaichaoLiang
@KaichaoLiang Hi, the 'register_full_backward_hook' is a new function in Pytorch1.8, you could change your current env to torch1.8. Or if you do not use the equalized focal loss, you could just annotate these codes.
您好,我运行样例的eval或者train都会提示这个错误,这个是和安装时编译有关吗,按说是安装成功了,感谢帮助
Traceback (most recent call last): File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-vacv/kaichaoliang/CondaEnv/UnitedDetection/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-vacv/kaichaoliang/CondaEnv/UnitedDetection/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-vacv/kaichaoliang/United-Perception/up/main.py", line 27, in
main()
File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-vacv/kaichaoliang/United-Perception/up/main.py", line 21, in main
args.run(args)
File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-vacv/kaichaoliang/United-Perception/up/commands/train.py", line 161, in _main
launch(main, args.num_gpus_per_machine, args.num_machines, args=args, start_method=args.fork_method)
File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-vacv/kaichaoliang/United-Perception/up/utils/env/launch.py", line 68, in launch
main_func(*(args,))
File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-vacv/kaichaoliang/United-Perception/up/commands/train.py", line 140, in main
runner = RUNNER_REGISTRY.get(runner_cfg['type'])(cfg, runner_cfg['kwargs'])
File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-vacv/kaichaoliang/United-Perception/up/runner/base_runner.py", line 60, in init
self.build()
File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-vacv/kaichaoliang/United-Perception/up/runner/base_runner.py", line 103, in build
self.build_hooks()
File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-vacv/kaichaoliang/United-Perception/up/runner/base_runner.py", line 296, in build_hooks
self._hooks = build_hooks(self, cfg_hooks, add_log_if_not_exists=True)
File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-vacv/kaichaoliang/United-Perception/up/utils/general/hook_helper.py", line 1114, in build_hooks
hooks = [build_single_hook(cfg) for cfg in cfg_list]
File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-vacv/kaichaoliang/United-Perception/up/utils/general/hook_helper.py", line 1114, in
hooks = [build_single_hook(cfg) for cfg in cfg_list]
File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-vacv/kaichaoliang/United-Perception/up/utils/general/hook_helper.py", line 1109, in build_single_hook
return HOOK_REGISTRY.build(cfg)
File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-vacv/kaichaoliang/United-Perception/up/utils/general/registry.py", line 111, in build
raise e
File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-vacv/kaichaoliang/United-Perception/up/utils/general/registry.py", line 101, in build
return build_fn( obj_kwargs)
File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-vacv/kaichaoliang/United-Perception/up/utils/general/hook_helper.py", line 593, in init
m.register_full_backward_hook(_backward_fn_hook)
File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-vacv/kaichaoliang/CondaEnv/UnitedDetection/lib/python3.7/site-packages/torch/nn/modules/module.py", line 779, in getattr
type(self).name, name))
torch.nn.modules.module.ModuleAttributeError: 'Conv2d' object has no attribute 'register_full_backward_hook'