In [1]:
from keras.datasets import cifar10
from keras.models import load_model
import numpy as np
from six.moves import cPickle as pickle

from IPython import display
import matplotlib.pyplot as plt

% matplotlib inline
% config InlineBackend.figure_format = 'retina'


Using TensorFlow backend.

In [2]:
def plotRecord(pickle_file):
    with open("records/" + pickle_file, 'rb') as f:
        records = pickle.load(f)

    display.display(plt.gcf())
    plt.figure(figsize=(10,8))
    plt.plot(records["disc"], label='discriminitive loss')
    plt.plot(records["gen"], label='generative loss')
    plt.plot(records["acc_real"], label='discriminator accuracy on real images')
    plt.plot(records["acc_gen"], label='discriminator accuracy on generated images')
    plt.plot(records["acc_other"], label='discriminator accuracy on other images')
    batch_count = [0.1 * n for n in records["gen_batches"]]
    plt.plot(batch_count, label='scaled mean generator repeat batches')
    plt.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)
    plt.ylim([0, 1.2])
    plt.show()

In [3]:
for record in range(10):
    plotRecord('record' + str(record) + '-500.pickle')


<matplotlib.figure.Figure at 0x1067ca410>
<matplotlib.figure.Figure at 0x1067ca410>
<matplotlib.figure.Figure at 0x11bddca10>
<matplotlib.figure.Figure at 0x11bddca10>
<matplotlib.figure.Figure at 0x11bd9f550>
<matplotlib.figure.Figure at 0x11bd9f550>
<matplotlib.figure.Figure at 0x11da81ad0>
<matplotlib.figure.Figure at 0x11da81ad0>
<matplotlib.figure.Figure at 0x11ca62fd0>
<matplotlib.figure.Figure at 0x11ca62fd0>
<matplotlib.figure.Figure at 0x106696c50>
<matplotlib.figure.Figure at 0x106696c50>
<matplotlib.figure.Figure at 0x11d9d9d10>
<matplotlib.figure.Figure at 0x11d9d9d10>
<matplotlib.figure.Figure at 0x11dc56dd0>
<matplotlib.figure.Figure at 0x11dc56dd0>
<matplotlib.figure.Figure at 0x11daf1e90>
<matplotlib.figure.Figure at 0x11daf1e90>
<matplotlib.figure.Figure at 0x11db29f50>
<matplotlib.figure.Figure at 0x11db29f50>

In [ ]: