Sound-classification-on-Raspberry-Pi-with-Tensorflow icon indicating copy to clipboard operation
Sound-classification-on-Raspberry-Pi-with-Tensorflow copied to clipboard

UnboundLocalError: local variable 'features' referenced before assignment

Open JeonHyungJin opened this issue 6 years ago • 1 comments

At classiPi.py I can`t find features is assigned. how can i solve this problem?

JeonHyungJin avatar Jan 23 '19 19:01 JeonHyungJin

you should initialize variable in extract_features function. like this.

features = np.empty((0,161))      # add this line 
features = np.vstack([features,ext_features])

kageomi avatar May 27 '21 18:05 kageomi