j96w/6-PACK

__getitem__ function cannot be invoked

Closed this issue · 3 comments

my environment:

  1. Ubuntu
  2. Pytorch 0.4.1
  3. Python 3.5

Does anyone encounter this problem? Thanks.

j96w commented

Hi, it's probably because the "try-except" code hides the bugs in your dataloader. This is why it seems like your program is halted. One method is to first remove the "try-except" code in Line 434 and Line 457 of the dataset/dataset_nocs.py. Then you can see the bugs. Another easier way is to add KeyboardInterrupt into the except situations, which is how I do to debug the dataloader.

  1. init function in dataset_nocs.py can be invoked successfully. 2. the code line "optimizer.zero_grad()" in the train.py can be performed successfully. 3. When performing the line of "for i, data in enumerate(dataloader, 0):" in the train.py, the getitem function cannot be called and then the program has been in halt status(like suspending, it's not crash). I printed the length of dataloader, which is 5000. Thanks!

    On Wed, Nov 20, 2019 at 9:14 PM LyuJ1998 @.***> wrote: Hi, can you provide me the output when you encountering this problem. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#3?email_source=notifications&email_token=AAIPL6JI6NBVAB7Y63UV5TLQUUZ27A5CNFSM4JO426K2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEER5XXQ#issuecomment-555998174>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIPL6MVFOZ4EC42OJKSM7DQUUZ27ANCNFSM4JO426KQ .

Hello, I met the same problem with you. The program has been in halt status at dataloader 5000. Could you pls tell me how solve the problem?

Many thank!