Exemplo n.º 1
0
vgg19 = path_folder + "5556x_mark_res_299x299_vgg19_cnn_100.npy"
inception_v3 = path_folder + "5556x_mark_res_299x299_inception_v3_cnn_100.npy"
xception = path_folder + "5556x_mark_res_299x299_xception_cnn_100.npy"

data_paths = [resnet50, vgg16, vgg19, xception, inception_v3]
val_data_names = ["resnet50","vgg16","vgg19","xception","inception_v3"]
train_data_names = ["resnet50","vgg16","vgg19","xception","inception_v3"]

hard_colors = ['red', 'green', 'blue', 'orange', 'purple']
light_colors = ['pink', 'lightgreen', 'lightblue', 'yellow', 'hotpink']
both_colors = []
both_data_names = []

special_histories = []
for i in range(0,len(data_paths)):
    special_histories.append(loadHistory(data_paths[i]))
    special_histories[i] = count_averages(special_histories[i], 'loss')

    both_colors.append(light_colors[i])
    both_colors.append(hard_colors[i])
    both_data_names.append(train_data_names[i])
    both_data_names.append(val_data_names[i]+" validation")

import matplotlib.pyplot as plt
#custom_title = 'Validation error averages'
#plt = plot_only_averages(plt, special_histories, val_data_names, hard_colors, custom_title)
#custom_title = 'Training error averages'
#plt = plot_only_averages(plt, special_histories, train_data_names, light_colors, custom_title, just='train')
custom_title = 'Validation and Training error averages, 299px'
plt = plot_only_averages(plt, special_histories, both_data_names, both_colors, custom_title, just='both',
                         save=[SAVE,out_folder_1])
Exemplo n.º 2
0
data_paths = {}
for d in depths:
    for w in widths:
        ind = 'w' + str(w) + '_d' + str(d)
        name = path_folder + 'w' + str(w) + '_depth' + str(d) + '.npy'
        data_paths[ind] = name

hard_colors = ['red', 'green', 'blue', 'orange']
light_colors = ['pink', 'lightgreen', 'lightblue', 'yellow']

# FIGURE 1

special_histories = {}

for key in data_paths.keys():
    special_histories[key] = loadHistory(data_paths[key])
    special_histories[key] = count_averages(special_histories[key], 'loss')

print special_histories.keys()

Notch = False

import matplotlib.pyplot as plt

plt, figure, stats = plot_4x4_derailed_boxes(plt,
                                             special_histories,
                                             BestInstead=True,
                                             forced_ymin=0.04,
                                             forced_ymax=0.11,
                                             Notch=Notch)