ASMIftekhar / VSGNet

VSGNet:Spatial Attention Network for Detecting Human Object Interactions Using Graph Convolutions.
MIT License
100 stars 20 forks source link

When running train, it stays in this state for a long time and does not run #25

Closed mansooreh1 closed 2 years ago

mansooreh1 commented 2 years ago

I want to run the program, but when I run "CUDA_VISIBLE_DEVICES=0 python main.py -fw new_test -ba 8 -l 0.001 -e 80 -sa 20", but it stays in this state for a long time and does not run. Why?That is, there is no progress. Is this correct? Or is wrong? image

ASMIftekhar commented 2 years ago

Without looking into your system, I can't answer your question. However, did you download the dataset fully? If this is HICO-DET's training set, the number of iteration should be more than 73.

mansooreh1 commented 2 years ago

I think loop for have a problem. I think it gets stuck in an infinite loop. Because the code and the loops and the spaces and tabs related to the loops and functions are flawed.

ASMIftekhar commented 2 years ago

Can you have a look on this issue https://github.com/ASMIftekhar/VSGNet/issues/9 ?

mansooreh1 commented 2 years ago

Excuse me, I did that too, but my problem was not solved. I feel stuck in an infinite loop.

ASMIftekhar commented 2 years ago

Ok. The next thing we can do is to find out which line it is getting stuck. You can put break point at the beginning of the loop and then execute one by one line. My best guesses are either it is getting stuck while sending the model to the gpu or calling the data loader.

mansooreh1 commented 2 years ago

Thanks for your attention. Based on your tips, I think part "dataloader" has a problem. When I type print(enumerate(tqdm(dataloader[phase]))) in line 219 of train_test.py, the output is "<enumerate object at 0x7fa0b9b75948>". This means that there is no i and iterr in line of code "for iterr,i in enumerate(tqdm(dataloader[phase])):"

mansooreh1 commented 2 years ago

Hello. I checked the entire of code. The main problem is with line 219 of code train_test.py in folder scripts_hico. "enumerate(tqdm(dataloader[phase]))" has not no values such as i and iterr. It has a problem and it does not have i and iterr value. please help me

ASMIftekhar commented 2 years ago

print(enumerate(tqdm(dataloader[phase]))) ---the output is "<enumerate object at 0x7fa0b9b75948>" this is expected, as you are wrapping the dataloader with enumerate function, it becomes an enumerate object.

Please print(iterr, i) to check if dataloader is working or not. I would strongly suggest to put a breakpoint instead of using print functions to debug.

Reference: https://www.geeksforgeeks.org/enumerate-in-python/