Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'AnchorHeadSingle' object has no attribute 'get_nms_pred_boxes_for_single_sample' #25

Open
florianeboumene opened this issue Nov 30, 2023 · 2 comments

Comments

@florianeboumene
Copy link

Hello,
Thank you for your great work.

Since i can not have the entire Dataset because of the size, i have downloaded the dataset in google drive and i want to use it for the training. I have organized it as specify in reamed and i use the default configuration file cfg_RTNH_wide.yaml in main_train_0.py. I set the path of my Dataset and i start the training. The Dataset have been loaded without problem and the training start. but after the first epoch is finished, i have the following error:
Test (Subset): 0%| | 0/500 [00:00<?, ?it/s]Traceback (most recent call last):
File "main_train_0.py", line 22, in
pline.train_network()
File "/home/keb-fs/K-Radar/pipelines/pipeline_detection_v1_0.py", line 318, in train_network
self.validate_kitti(epoch, list_conf_thr=self.list_val_conf_thr, is_subset=True)
File "/home/keb-fs/K-Radar/pipelines/pipeline_detection_v1_0.py", line 467, in validate_kitti
dict_out = self.network.list_modules[1].get_nms_pred_boxes_for_single_sample(dict_out, conf_thr, is_nms=True)
File "/home/keb-fs/anaconda3/envs/kradar/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1185, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'AnchorHeadSingle' object has no attribute 'get_nms_pred_boxes_for_single_sample'

Looking forward to your response.

@DongHeePaek
Copy link
Collaborator

DongHeePaek commented Nov 30, 2023

Hi @florianeboumene,

The issue occurs in the validation loop after completing one training epoch. If you wish to bypass this code during training, please set 'VAL_PER_EPOCH_SUBSET' and 'VAL_PER_EPOCH_FULL' to a larger number, such as 100.

Thank you.

@florianeboumene
Copy link
Author

Hi @DongHeePaek,

I've tested it, and it's functioning properly. However, the validation is no longer being executed. I don't want to bypass the validation code since I also require it. Could you please advise on how to ensure that the evaluation code works without any issues?

Thank you in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants