Skip to content

Commit

Permalink
update mlp_training.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hamuchiwa authored Jun 10, 2017
1 parent 0668b13 commit 139e432
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions computer/mlp_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import cv2
import numpy as np
import glob
import sys
from sklearn.cross_validation import train_test_split

print 'Loading training data...'
Expand All @@ -13,6 +14,11 @@
label_array = np.zeros((1, 4), 'float')
training_data = glob.glob('training_data/*.npz')

# if no data, exit
if not training_data:
print "No training data in directory, exit"
sys.exit()

for single_npz in training_data:
with np.load(single_npz) as data:
train_temp = data['train']
Expand Down

0 comments on commit 139e432

Please sign in to comment.