bearyi26 / DCPT

[ICRA2024] Darkness Clue-Prompted Tracking in Nighttime UAVs
MIT License
20 stars 2 forks source link

train error please answer #4

Open sczxy1 opened 3 months ago

sczxy1 commented 3 months ago

Traceback (most recent call last): File "D:\deeptrack\DCPT\lib\train../..\lib\train\trainers\base_trainer.py", line 85, in train self.train_epoch() File "D:\deeptrack\DCPT\lib\train../..\lib\train\trainers\ltr_trainer.py", line 136, in train_epoch self.cycle_dataset(loader) File "D:\deeptrack\DCPT\lib\train../..\lib\train\trainers\ltr_trainer.py", line 73, in cycle_dataset self.actor.fix_bns() File "D:\deeptrack\DCPT\lib\train../..\lib\train\actors\DCPT.py", line 39, in fix_bns net = self.net.module File "D:\Software\anaconda3\envs\Pytorch_py39\lib\site-packages\torch\nn\modules\module.py", line 1269, in getattr raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'DCPT' object has no attribute 'module'

Z-Z188 commented 1 month ago

Traceback (most recent call last): File "D:\deeptrack\DCPT\lib\train../..\lib\train\trainers\base_trainer.py", line 85, in train self.train_epoch() File "D:\deeptrack\DCPT\lib\train../..\lib\train\trainers\ltr_trainer.py", line 136, in train_epoch self.cycle_dataset(loader) File "D:\deeptrack\DCPT\lib\train../..\lib\train\trainers\ltr_trainer.py", line 73, in cycle_dataset self.actor.fix_bns() File "D:\deeptrack\DCPT\lib\train../..\lib\train\actors\DCPT.py", line 39, in fix_bns net = self.net.module File "D:\Software\anaconda3\envs\Pytorch_py39\lib\site-packages\torch\nn\modules\module.py", line 1269, in getattr raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'DCPT' object has no attribute 'module'

你好,我也遇到这个问题了,请问你解决了吗

bearyi26 commented 1 month ago

Hello! Thanks for reaching out. If you're using a single GPU for training, you can modify the code to net = self.net. However, if you use multiple GPU for training, you do not need to make this change.

Z-Z188 commented 1 month ago

Hello! Thanks for reaching out. If you're using a single GPU for training, you can modify the code to net = self.net. However, if you use multiple GPU for training, you do not need to make this change.

Thanks!!!