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

AssertionError #5

Open
G200005 opened this issue Nov 8, 2024 · 1 comment
Open

AssertionError #5

G200005 opened this issue Nov 8, 2024 · 1 comment

Comments

@G200005
Copy link

G200005 commented Nov 8, 2024

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
Copy link
Owner

JeonJaeHyeong commented Nov 8, 2024

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.

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