Skip to content

Instantly share code, notes, and snippets.

@previtus
Created February 16, 2017 19:33
Show Gist options
  • Select an option

  • Save previtus/0fb0c062e8c6bc59173cda48b0964637 to your computer and use it in GitHub Desktop.

Select an option

Save previtus/0fb0c062e8c6bc59173cda48b0964637 to your computer and use it in GitHub Desktop.
# numpy save and load:
np.save(open('labels_from_segments.npy', 'w'), labels_from_segments)
np.save(open('labels_from_model.npy', 'w'), labels_from_model)
labels_from_segments = np.load(open('labels_from_segments.npy'))
labels_from_model = np.load(open('labels_from_model.npy'))
@previtus

Copy link
Copy Markdown
Author

for Python 3

# save
np.save(open('bottleneck_features_train.npy', 'wb'), bottleneck_features_train)

# load
train_data = np.load(open('bottleneck_features_train.npy', 'rb'))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment