RNN-for-Human-Activity-Recognition-using-2D-Pose-Input icon indicating copy to clipboard operation
RNN-for-Human-Activity-Recognition-using-2D-Pose-Input copied to clipboard

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

Open jongsukchoi opened this issue 6 years ago • 7 comments

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 avatar Oct 23 '18 06:10 jongsukchoi

I fixed it

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

jongsukchoi avatar Oct 23 '18 06:10 jongsukchoi

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

RaghunandanVenkatesh avatar Apr 10 '19 11:04 RaghunandanVenkatesh

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

Snehal-Reddy avatar May 22 '20 17:05 Snehal-Reddy

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

arvindchandel avatar Jan 02 '21 19:01 arvindchandel

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

Maia97 avatar Feb 08 '21 13:02 Maia97

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

bibinss avatar Jun 03 '21 04:06 bibinss

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

CatPy3 avatar Aug 05 '23 21:08 CatPy3