<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 This notebook investigates the alexnet-based model with 8-augmentation with an extra convolutional layer with 192 output channels (as in the original paper by Krizhevsky et al). 
When training the model, we saved both files from the best and most recent epoch. First plot the most recent file, to see the evolution of parameters.
Step1:  The graph keeps going down for the train_y_nll while it is sort of stable and slightly sloping upwards for valid_y_nll and valid_objective. We think it suggests that we are overfitting.
Let's now see the best parameter values.
Step2:  Holoviews appears to be letting me down below. The plot for Train_y_nll appears to show it going down to zero due to it cutting off the bottom of the y axis...
Step3:  The scale of the graphs is 10^6 not 10^7, so supposedly this is the best value of valid_objective before we started overfitting.
Let's now see what score we get with the best parameter values from this model.
Step4:  Looks like a better score than the current best! Let's submit it to the leaderboard. Write a submisstion file
Step5:  Copy the file to your local machine
<ASSISTANT_TASK:>
Python Code:
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
m = pylearn2.utils.serial.load(
    "/disk/scratch/neuroglycerin/models/alexnet_based_extra_convlayer.pkl.recent")
channel = m.monitor.channels["valid_objective"]
hl.Curve(zip(channel.example_record,channel.val_record),label="valid_objective")
plt.plot(channel.example_record,channel.val_record)
def make_curves(model, *args):
    curves = None
    for c in args:
        channel = m.monitor.channels[c]
        c = c[0].upper() + c[1:]
        if not curves:
            curves = hl.Curve(zip(channel.example_record,channel.val_record),group=c)
        else:
            curves += hl.Curve(zip(channel.example_record,channel.val_record),group=c)
    return curves
make_curves(m,"valid_objective","valid_y_nll","train_y_nll")
Explanation: This notebook investigates the alexnet-based model with 8-augmentation with an extra convolutional layer with 192 output channels (as in the original paper by Krizhevsky et al). 
When training the model, we saved both files from the best and most recent epoch. First plot the most recent file, to see the evolution of parameters.
End of explanation
m = pylearn2.utils.serial.load(
    "/disk/scratch/neuroglycerin/models/alexnet_based_extra_convlayer.pkl")
Explanation: The graph keeps going down for the train_y_nll while it is sort of stable and slightly sloping upwards for valid_y_nll and valid_objective. We think it suggests that we are overfitting.
Let's now see the best parameter values.
End of explanation
make_curves(m,"valid_y_nll","valid_objective","train_y_nll")
4000000./(8*30000)
7*16
Explanation: Holoviews appears to be letting me down below. The plot for Train_y_nll appears to show it going down to zero due to it cutting off the bottom of the y axis...
End of explanation
cd ..
%run check_test_score.py -v run_settings/alexnet_based_extra_convlayer.json
Explanation: The scale of the graphs is 10^6 not 10^7, so supposedly this is the best value of valid_objective before we started overfitting.
Let's now see what score we get with the best parameter values from this model.
End of explanation
!python test.py -v run_settings/alexnet_based_extra_convlayer.json
Explanation: Looks like a better score than the current best! Let's submit it to the leaderboard. Write a submisstion file:
End of explanation
scp s1320903@stonesoup:/disk/scratch/neuroglycerin/submissions/alexnet_based_extra_convlayer.csv.gz /home/aselega/Neuroglycerin/submissions/
Explanation: Copy the file to your local machine:
End of explanation
<END_TASK>