yuantn/MI-AOD

出现以下问题,不知道如何解决

Risesharply opened this issue · 1 comments

Traceback (most recent call last):
File "tools/train.py", line 257, in
main()
File "tools/train.py", line 170, in main
distributed=distributed, validate=(not args.no_validate), timestamp=timestamp, meta=meta)
File "d:\pythonproject\mi-aod\mmdet\apis\train.py", line 120, in train_detector
runner.run(data_loaders_L, cfg.workflow, cfg.total_epochs)
File "D:\Anaconda\envs\grounded-sam\lib\site-packages\mmcv\runner\epoch_based_runner.py", line 136, in run
epoch_runner(data_loaders[i], **kwargs)
File "D:\Anaconda\envs\grounded-sam\lib\site-packages\mmcv\runner\epoch_based_runner.py", line 53, in train
self.run_iter(data_batch, train_mode=True, **kwargs)
File "D:\Anaconda\envs\grounded-sam\lib\site-packages\mmcv\runner\epoch_based_runner.py", line 32, in run_iter
**kwargs)
File "D:\Anaconda\envs\grounded-sam\lib\site-packages\mmcv\parallel\data_parallel.py", line 77, in train_step
return self.module.train_step(*inputs[0], **kwargs[0])
File "d:\pythonproject\mi-aod\mmdet\models\detectors\base.py", line 228, in train_step
losses = self(**data)
File "D:\Anaconda\envs\grounded-sam\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "d:\pythonproject\mi-aod\mmdet\core\fp16\decorators.py", line 51, in new_func
return old_func(*args, **kwargs)
TypeError: forward() missing 1 required positional argument: 'x'
环境配置如下:
Python: 3.7.16 (default, Jan 17 2023, 16:06:28) [MSC v.1916 64 bit (AMD64)]
CUDA available: True
CUDA_HOME: D:\Program Files\Nvidia\CUDA\v11.5
NVCC: Build cuda_11.5.r11.5/compiler.30672275_0
GPU 0: NVIDIA GeForce RTX 3060 Laptop GPU
GCC: gcc (MinGW.org GCC-6.3.0-1) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
PyTorch: 1.11.0+cu115

请参考 问题 #5 的解决方案。


Please refer to the resolution in Issue #5.