JeonJaeHyeong / DPL

Code for paper "Semantic Diversity-aware Prototype-based Learning for Unbiased Scene Graph Generation (ECCV 2024)"
Other
17 stars 0 forks source link

AssertionError #5

Open G200005 opened 1 week ago

G200005 commented 1 week ago

Hello, when I use the following command for training, there is an error reported. The error report shows assert l_batch == 1, AssertionError. what is going on please? CUDA_VISIBLE_DEVICES=4,6 python tools/relation_train_net.py --config-file configs/e2e_relation_X_101_32_8_FPN_1x.yaml \ MODEL.ROI_RELATION_HEAD.USE_GT_BOX False \ MODEL.ROI_RELATION_HEAD.USE_GT_OBJECT_LABEL False \ OUTPUT_DIR $OUTPATH \ MODEL.ROI_RELATION_HEAD.PREDICTOR MotifsLikePredictor_DPL \ GLOBAL_SETTING.BASIC_ENCODER Motifs \ SOLVER.IMS_PER_BATCH $((3 gpu_num)) \ TEST.IMS_PER_BATCH $((3 gpu_num)) \ SOLVER.MAX_ITER 60000 \ SOLVER.VAL_PERIOD 2000 \ SOLVER.CHECKPOINT_PERIOD 2000 \ MODEL.ROI_RELATION_HEAD.DPL.N_DIM 128 \ MODEL.ROI_RELATION_HEAD.DPL.ALPHA 10 \ MODEL.ROI_RELATION_HEAD.DPL.AVG_NUM_SAMPLE 20 \ MODEL.ROI_RELATION_HEAD.DPL.RADIUS 1.0 \ GLOBAL_SETTING.DATASET_CHOICE "VG" 2>&1 | tee error.log

and When I run the code, the glove file is not automatically downloaded to DPL/datasets/vg/glove, but to DPL/datasetsdatasets/vg/glove, which looks very strange, may I ask why? image

JeonJaeHyeong commented 1 week ago

Sorry about that.

The assert error was related to the test batch size. In the line TEST.IMS_PER_BATCH $[3*$gpu_num] \, removing the 3 and setting it to just $gpu_num makes it work correctly. I have fixed that part and updated it.

Secondly, there was an issue with the glove path. Specifically, the problem was with _C.GLOVE_DIR in default.py. I have updated the repository, and changing _C.GLOVE_DIR to DatasetCatalog.DATA_DIR + "/vg/glove" should fix it.

Thank you for the valuable feedback.