asingh33 / CNNGestureRecognizer

Gesture recognition via CNN. Implemented in Keras + Tensorflow/Theano + OpenCV
MIT License
981 stars 358 forks source link

ValueError: The truth value of an array with more than one element is ambiguous. #49

Closed DukeHouse closed 5 years ago

DukeHouse commented 5 years ago

hi, i have runed your program and success recognized gestures, it is amazing,thanks for your work,but I can't use visualizeLayers() function. it callback ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() I can not reallize the following code:

if img <= len(imlist):

image = np.array(Image.open('./imgs/' + 0-[img.all() - 1]).convert('L')).flatten()

can you demonstrate it? it is great pleasure for your reply!

asingh33 commented 5 years ago

In this video, I have given a quick usage example of layer visualization. Here is the link: https://youtu.be/CMs5cn65YK8?t=91

Let me know if it helps.

asingh33 commented 5 years ago

I have fixed this issue. Pull the latest code.

DukeHouse commented 5 years ago

Thanks for your help, it works!