Skip to content

Commit

Permalink
Fix incorrect class count in cnn.py
Browse files Browse the repository at this point in the history
Update README
  • Loading branch information
imfing committed Jan 22, 2020
1 parent 7c69d45 commit d7c1c70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- numpy
- librosa
- pysoundfile
- sounddevice
- matplotlib
- scikit-learn
- tensorflow
Expand Down
3 changes: 2 additions & 1 deletion cnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def train(args):

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.4, random_state=233)

class_count = len(os.listdir('data/'))
# Count the number of sub-directories in 'data'
class_count = len(next(os.walk('data/'))[1])

# Build the Neural Network
model = Sequential()
Expand Down

0 comments on commit d7c1c70

Please sign in to comment.