stuarteiffert / RNN-for-Human-Activity-Recognition-using-2D-Pose-Input

Activity Recognition from 2D pose using an LSTM RNN
288 stars 77 forks source link

AttributeError: 'range' object has no attribute 'remove' #6

Open jongsukchoi opened 5 years ago

jongsukchoi commented 5 years ago

Hi~ I'm faced with problem in extract_batch_size.

_unsampled is range!! but 'range' object has no attribute 'remove'

how do I fix it?

jongsukchoi commented 5 years ago

I fixed it

unsampled_indices = range(0, len(X_train)) ----> unsampled_indices = list(range(0, len(X_train)))

RaghunandanVenkatesh commented 5 years ago

Hi, This solution isn't working for me. Anybody please help

Snehal-Reddy commented 4 years ago

It does work. Just make sure all the instances of unsampled_indices being initialised to range are converted to list first.

arvindchandel commented 3 years ago

I also faced the same issue and this solution by @Snehal-Reddy works fine.

Maia97 commented 3 years ago

met similar error: AttributeError: 'range' object has no attribute 'ndim' np.array(range(x)) works, thanks above.

bibinss commented 3 years ago

fixed in this PR https://github.com/stuarteiffert/RNN-for-Human-Activity-Recognition-using-2D-Pose-Input/pull/31

CatPy3 commented 1 year ago

list = list(range(N1, N2)). Just add 'list' function