Created
March 28, 2020 14:18
-
-
Save miki998/7710c1c2709bbfe0587363e4ede2026d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with h5py.File("./full_dataset_vectors.h5", "r") as hf: | |
# Split the data into training/test features/targets | |
X_train = hf["X_train"][:] | |
targets_train = hf["y_train"][:] | |
X_test = hf["X_test"][:] | |
targets_test = hf["y_test"][:] | |
# Determine sample shape | |
sample_shape = (16, 16, 16, 3) | |
# Reshape data into 3D format | |
X_train = rgb_data_transform(X_train) | |
X_test = rgb_data_transform(X_test) | |
# Convert target vectors to categorical targets | |
targets_train = to_categorical(targets_train).astype(np.integer) | |
targets_test = to_categorical(targets_test).astype(np.integer) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment