In [1]:
import pylearn2.utils
import pylearn2.config
import theano
import neukrill_net.dense_dataset
import neukrill_net.utils
import numpy as np
%matplotlib inline
import matplotlib.pyplot as plt
import holoviews as hl
%load_ext holoviews.ipython
import sklearn.metrics
In [2]:
cd ..
In [3]:
settings = neukrill_net.utils.Settings("settings.json")
run_settings = neukrill_net.utils.load_run_settings(
"run_settings/alexnet_based_norm_global_8aug_pmlp1.json", settings, force=True)
In [4]:
model = pylearn2.utils.serial.load(run_settings['alt_picklepath'])
In [25]:
def plot_monitor(model,c = 'valid_y_nll'):
channel = model.monitor.channels[c]
plt.title(c)
plt.grid(which="both")
plt.plot(channel.example_record,channel.val_record)
return None
In [21]:
%run ~/repos/pylearn2/pylearn2/scripts/print_monitor.py /disk/scratch/neuroglycerin/models/alexnet_based_norm_global_8aug_pmlp1.pkl
In [19]:
plot_monitor(model,c="valid_objective")
In [20]:
plot_monitor(model,c="valid_y_nll")
In [22]:
plot_monitor(model,c="train_objective")
In [23]:
plot_monitor(model,c="train_y_nll")
A bit of overfitting happening here, but is it more than normal. Looking at the network before adding that layer:
In [29]:
run_settings = neukrill_net.utils.load_run_settings(
"run_settings/alexnet_based_norm_global_8aug.json", settings, force=True)
old = pylearn2.utils.serial.load(run_settings['pickle abspath'])
In [30]:
plot_monitor(old,c="train_y_nll")
It drops faster and ends lower than without the MLP layer. Suspect whatever is happening here, the extra MLP layer is not having much of an effect.
In [31]:
run_settings = neukrill_net.utils.load_run_settings(
"run_settings/alexnet_based_norm_global_8aug_pmlp2.json", settings, force=True)
twomlp = pylearn2.utils.serial.load(run_settings['alt_picklepath'])
In [32]:
%run ~/repos/pylearn2/pylearn2/scripts/print_monitor.py /disk/scratch/neuroglycerin/models/alexnet_based_norm_global_8aug_pmlp2.pkl
In [33]:
plot_monitor(twomlp, c="valid_objective")
In [34]:
plot_monitor(twomlp, c="train_objective")
Seems to be very similar to the last one. Unsure what effect adding the extra MLP layer has actually had.