Temporal_Query_Networks icon indicating copy to clipboard operation
Temporal_Query_Networks copied to clipboard

Where is self.queue defined in fill_SUFB?

Open jackfenghhhhh opened this issue 2 years ago • 4 comments

Hi, thank you for your contribution. Could you tell me where the self.queue in fill_SUFB is defined?

jackfenghhhhh avatar Oct 05 '22 03:10 jackfenghhhhh

Hi, thank you for your contribution. Could you tell me where the self.queue in fill_SUFB is defined?

你找到了吗,我跑train2nd也报这个错,我找了一下也是没定义啊

insist-arui avatar Jan 15 '24 08:01 insist-arui

Hi, sorry for the late reply.

self.queue is defined here: https://github.com/Chuhanxx/Temporal_Query_Networks/blob/ac73e3375753463956f90037d59af5d3d50967e4/scripts/train_2nd_stage.py#L126, this line is for both definition and loading the queue values for initialisation from the features saved in the 1st stage. If you have any error related to 'self.queue' missing, please check if args.feature_file is properly defined as an argument, and if the values are loaded successfully.

Please let me know if there is any further question. Thanks!

Chuhanxx avatar Jan 15 '24 08:01 Chuhanxx

Hi, sorry for the late reply.

self.queue is defined here:

https://github.com/Chuhanxx/Temporal_Query_Networks/blob/ac73e3375753463956f90037d59af5d3d50967e4/scripts/train_2nd_stage.py#L126

, this line is for both definition and loading the queue values for initialisation from the features saved in the 1st stage. If you have any error related to 'self.queue' missing, please check if args.feature_file is properly defined as an argument, and if the values are loaded successfully. Please let me know if there is any further question. Thanks!

您好,您说到train_2nd_stage.py的126行定义了net.module.queue 但这段的触发条件是 args.pretrained_weights_path!='': 但在sencond_stage.yaml文件里pretrained_weights_path的默认值是“”,是空的,所以没有触发这个定义。那我是要把第二阶段的配置文件里的pretrained_weights_path这个改成什么呢

insist-arui avatar Jan 15 '24 09:01 insist-arui

Hi, sorry for the late reply. self.queue is defined here: https://github.com/Chuhanxx/Temporal_Query_Networks/blob/ac73e3375753463956f90037d59af5d3d50967e4/scripts/train_2nd_stage.py#L126

, this line is for both definition and loading the queue values for initialisation from the features saved in the 1st stage. If you have any error related to 'self.queue' missing, please check if args.feature_file is properly defined as an argument, and if the values are loaded successfully. Please let me know if there is any further question. Thanks!

您好,您说到train_2nd_stage.py的126行定义了net.module.queue 但这段的触发条件是 args.pretrained_weights_path!='': 但在sencond_stage.yaml文件里pretrained_weights_path的默认值是“”,是空的,所以没有触发这个定义。那我是要把第二阶段的配置文件里的pretrained_weights_path这个改成什么呢

As described in the README file, you need to do the following before starting the second stage training:

  1. train the model in the first stage, and set pretrained_weights_path in the sencond_stage.yaml to the path of ckpt from the first stage.
  2. run construct_SUFB.py to get the feature_file, and change the feature_file in the yaml to the output file correspondingly
 python construct_SUFB.py --dataset diving48 --dataset_config ../configs/Diving48_first_stage.yaml \
--gpus 0  --resume_file  $PATH_TO_BEST_FILE_FROM_1ST_STAGE --out_dir $DIR_FOR_SAVING_FEATURES 

Chuhanxx avatar Jan 15 '24 10:01 Chuhanxx