Skip to content

Commit

Permalink
reduce datasize for 4GB GPU ram
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Zotti authored and Ryan Zotti committed Aug 29, 2016
1 parent f76e17e commit bcd7373
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions make_sample.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import numpy as np
from util import shuffle_dataset

data_path = '/Users/ryanzotti/Documents/repos/Self_Driving_RC_Car'
npzfile = np.load(data_path+'/final_processed_data_3_channels.npz')

train_predictors = npzfile['train_predictors']
train_targets = npzfile['train_targets']
train_predictors, train_targets = shuffle_dataset(train_predictors, train_targets)
train_predictors = train_predictors[:5000]
train_targets = train_targets[:5000]

validation_predictors = npzfile['validation_predictors']
validation_targets = npzfile['validation_targets']
validation_predictors, validation_targets = shuffle_dataset(validation_predictors, validation_targets)
validation_predictors = validation_predictors[:2000]
validation_targets = validation_targets[:2000]

np.savez(data_path + '/training', predictors=train_predictors,targets=train_targets)
np.savez(data_path + '/validation', predictors=validation_predictors,targets=validation_targets)

print("Finished")

0 comments on commit bcd7373

Please sign in to comment.