text_plain_output_1.png
from keras.utils import to_categorical

import h5py

import numpy as np

import pandas as pd

data = pd.read_csv('../input/letters.csv')
files = data['file']
letters = data['letter']
backgrounds = data['background']

f = h5py.File('../input/LetterColorImages.h5', 'r')
keys = list(f.keys())
keys

backgrounds = np.array(f[keys[0]])
tensors = np.array(f[keys[1]])
targets = np.array(f[keys[2]])

backgrounds = to_categorical(backgrounds, 2)
backgrounds.shape