Skip to content

Commit

Permalink
Pushing a partial commit to restart after weekend
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragav Venkatesan committed Feb 14, 2017
1 parent 4d31068 commit e72b79b
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 15 deletions.
8 changes: 4 additions & 4 deletions docs/source/license.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ Credits and copyright attributions to other sources:
* Ofcourse, this toolbox contains code from numpy, Contains code from NumPy,
Copyright (c) 2005-2011, NumPy Developers. All rights reserved.

* Although none of the software was ever directly used, Lasagne played a
signnificant role in the developement of yann. Part of the intention
* Lasagne played a signnificant role in the developement of yann. Part of the intention
in begining to develop yann was that Lasagne was getting too large for the
authors to keep up. Lasagne therefore insipired some of the aspects of this toolbox.
Although no pieces of code was used from Lasagne, some philosophies come from
there and therefore credit is due for Lasagne forums and issues section.
One of the contributors who submitted the rotate layer, used code re-distributed from
Lasagne toolbox as well. So, in honoring their license,
Copyright (c) 2014-2016 Lasagne contributors.

* Credit is also due to developers of skdata, progressbar, networkx and developers of
all the other dependencies that helping in the creating of this toolbox. Go team OpenSource!
4 changes: 2 additions & 2 deletions pantry/tutorials/mat2yann.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def cook_svhn_normalized( location, verbose = 1, **kwargs):

data_params = {
"source" : 'mat',
"name" : 'yann_svhn',
"location" : location,
"name" : 'yann_Svhn', # some name.
"location" : location, # some location
"height" : 32,
"width" : 32,
"channels" : 3 }
Expand Down
31 changes: 23 additions & 8 deletions yann/modules/resultor.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class resultor(module):
resultor_init_args = {
"root" : "<root directory to save stuff inside>",
"results" : "<results_file_name>.txt",
"errors" : "<error_file_name>.txt",
"accuracy" : "<error_file_name>.txt",
"costs" : "<cost_file_name>.txt",
"confusion" : "<confusion_file_name>.txt",
"network" : "<network_save_file_name>.pkl"
Expand Down Expand Up @@ -48,7 +48,7 @@ def __init__( self, resultor_init_args, verbose = 1):
if not "results" in resultor_init_args.keys():
resultor_init_args["results"] = "results.txt"

if not "errors" in resultor_init_args.keys():
if not "accuracy" in resultor_init_args.keys():
resultor_init_args["erros"] = "errors.txt"

if not "costs" in resultor_init_args.keys():
Expand All @@ -74,7 +74,7 @@ def __init__( self, resultor_init_args, verbose = 1):
self.root = value
elif item == "results":
self.results_file = value
elif item == "errors":
elif item == "accuracy":
self.error_file = value
elif item == "costs":
self.cost_file = value
Expand All @@ -98,11 +98,26 @@ def __init__( self, resultor_init_args, verbose = 1):
if verbose >= 3:
print "... Resultor is initiliazed"

def process_results( self,
cost,
lr,
mom,
verbose = 2):
def cook ( self,
cost,
lr,
mom,
acc,
verbose = 2):
"""
Get the arrays from the network and make them available locally in this module.
Args:
cost: cost arrays (numpy array)
lr: learning rate array (theano tensor)
mom: momentum array (theano tensor)
acc: accuracy tuple of (training, validation)
"""



def process_results( ):
"""
This method will print results and also write them down in the appropriate files.
Expand Down
11 changes: 10 additions & 1 deletion yann/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -1794,7 +1794,16 @@ def _cook_resultor (self, resultor = None, verbose = 2):
Args:
verbose: as always
"""
if verbose > 3:
if verbsoe >= 3:
print "... Cooking the resultor"

resultor.cook(cost = self.cost,
lr = self.learning_rate,
mom = self.mom,
acc = (self.training_accuracy, self.validation_accuracy)
)

if verbose >= 3:
print "... Resultor is cooked"

def visualize_activities( self, epoch = 0, verbose = 2):
Expand Down

0 comments on commit e72b79b

Please sign in to comment.