f9761b45d25b28cb952a4a90346e58e730b5099d,examples/convolutional_model.py,,,#,3

Before Change


directory_path = "image_data/sample_image_directory"

dataLoader = DataLoader(from_csv=False, datapath=directory_path)
image_data, labels, emotion_map = dataLoader.get_data()
if verbose:
    print("raw image data shape: " + str(image_data.shape))

After Change



dataLoader = DataLoader(from_csv=False, datapath=directory_path)
dataset = dataLoader.get_data()
labels = dataset.get_labels()
images = dataset.get_images()

if verbose:
    print("raw image data shape: " + str(images.shape))

print("Creating training/testing data...")
validation_split = 0.15
X_train, X_test, y_train, y_test = train_test_split(images, labels,
                                                    test_size=validation_split, random_state=42, stratify=labels)
train_gen = DataGenerator().fit(X_train, y_train)
test_gen = DataGenerator().fit(X_test, y_test)
print("Training net...")
model = ConvolutionalNN(target_dimensions, channels, dataset.get_emotion_index_map())
model.fit_generator(train_gen.generate(target_dimensions, batch_size=5),
                    test_gen.generate(target_dimensions, batch_size=5),
                    epochs=10)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: thoughtworksarts/EmoPy
Commit Name: f9761b45d25b28cb952a4a90346e58e730b5099d
Time: 2018-04-26
Author: angelica.perez37@gmail.com
File Name: examples/convolutional_model.py
Class Name:
Method Name:


Project Name: thoughtworksarts/EmoPy
Commit Name: c1b3482f575bf75557c8072b3f857672bddd3588
Time: 2018-04-26
Author: angelica.perez37@gmail.com
File Name: examples/transferlearning_model.py
Class Name:
Method Name:


Project Name: thoughtworksarts/EmoPy
Commit Name: a71f947ef53d1adb3dc0325c121dff2f3809a738
Time: 2018-04-26
Author: angelica.perez37@gmail.com
File Name: examples/convolutional_lstm_model.py
Class Name:
Method Name:


Project Name: thoughtworksarts/EmoPy
Commit Name: a71f947ef53d1adb3dc0325c121dff2f3809a738
Time: 2018-04-26
Author: angelica.perez37@gmail.com
File Name: examples/timedelay_conv_model.py
Class Name:
Method Name: