question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IndexError on ensemble.py

See original GitHub issue

Hello,

I have trained the joint and bone model for NTU120 and now I want to ensemble their results, therefore I am running the following command:

python ensemble.py --dataset ntu120/xsub --joint-dir work_dir/ntu120/xsub/msg3d_joint/ --bone-dir work_dir/ntu120/xsub/msg3d_bone/

But I am having this error:

Traceback (most recent call last): File “ensemble.py”, line 44, in <module> _, r11 = r1[i] IndexError: list index out of range

I have printed the length of those lists and I found that r1 and r2 have different length than label:

label: 101838 r1: 50919 r2: 50919

Can you help solving this issue?

Ps: I am using a CentOS Linux

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
egrasslcommented, Oct 26, 2020

@kenziyuliu thank you very much and sorry for giving you trouble!

I did not rembember changing the ntu120_gendata.py file, but I probably did it by accident.

I have one more question, but I will make it a new topic since it is related to fine tuning.

0reactions
kenziyuliucommented, Oct 21, 2020

Thank you. I will do that and let you know the results!

Also, may I ask you one last question before I do that?

My directories structure is in the picture bellow. I have extracted the samples from the zip files into the two ntu directores as the readme instructs. Do you see any problem with my raw data structure for NTU120?

Screenshot_20201020_205759

It does look good to me, though I’ll just repeat that the content of nturgbd_skeletons_s001_to_s017.zip goes to nturgb+d_skeletons/ and the content of nturgbd_skeletons_s018_to_s032.zip goes to nturgb+d_skeletons120/ and you should be good.

Read more comments on GitHub >

github_iconTop Results From Across the Web

scikit-learn AdaBoostRegressor IndexError: index 1 is out of ...
This is the python code that I'm trying to run. ... datasets from sklearn.ensemble import AdaBoostRegressor boston = datasets.load_boston() ...
Read more >
Multithreading issue - IndexError · Issue #75 · flennerhag/mlens
When launching these, Python corrupts the thread state in child processes, so that each think more threads are available than what is the...
Read more >
How to Fix IndexError in Python - Rollbar
The IndexError in Python occurs when an item from a list is attempted to be accessed that is outside the index range of...
Read more >
Most Common Python Error Types in Data Science
IndexError happens when the index of a sequence is out of range. If you have a column with 3 elements, but you want...
Read more >
Python – How to fix IndexError: invalid index to scalar variable ...
How to fix it? import pandas as pd import numpy as np from sklearn import ensemble from sklearn import cross_validation def ToWeight(y): w...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found