isseu / emotion-recognition-neural-networks

Emotion recognition using DNN with tensorflow
MIT License
835 stars 308 forks source link

plot_emotion_matrix.py 'PolyCollection' has no attributes 'get_axes()' #36

Open MarkleJam opened 6 years ago

MarkleJam commented 6 years ago

Hi. When I run the plot_emotion_matrix.py, I find an error: AttributeError: 'PolyCollection' object has no attribute 'get_axes'. Below is the function concerning the error. I am wondering how to solve it def show_values(pc, fmt="%.2f", **kw): #from itertools import zip pc.update_scalarmappable() ax = pc.get_axes()

AdrienPlayerium commented 6 years ago

ax = pc.get_axes() to ax = pc.axes

MarkleJam commented 6 years ago

@AdrienPlayerium Thanks a lot. It really works.

snowalala commented 6 years ago

Hi. When I run the plot_emotion_matrix.py, I find an error: File "plot_emotion_matrix.py", line 20, in for i in xrange(images.shape[0]): NameError: name 'xrange' is not defined

I am wondering how to solve it

KiwiTae commented 6 years ago

@snowalala if you are still looking, wild guess, but you are probably using python3, so just use range() instead of xrange()

snowalala commented 6 years ago

@KiwiTae Thanks a lot. It really works.