Skip to content

Instantly share code, notes, and snippets.

@miki998
Created April 15, 2020 07:00
Show Gist options
  • Save miki998/35f3243ad32a1ef4197ca0a77f4fe905 to your computer and use it in GitHub Desktop.
Save miki998/35f3243ad32a1ef4197ca0a77f4fe905 to your computer and use it in GitHub Desktop.
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