Skip to content

Commit

Permalink
Merge pull request #40 from ragavvenkatesan/master
Browse files Browse the repository at this point in the history
Syncing Dev
  • Loading branch information
Ragav Venkatesan committed Mar 3, 2017
2 parents cc3afe8 + 0b1daf3 commit 0dfa0c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import theano
# import theano.sandbox.cuda

theano.config = Mock(device='gpu')
# theano.config = Mock(device='gpu')
# theano.sandbox.cuda.cuda_enabled = True
# theano.sandbox.cuda.dnn = Mock(dnn_available=lambda: True)
# sys.modules['theano.sandbox.cuda.blas'] = Mock(GpuCorrMM=None)
Expand Down
11 changes: 5 additions & 6 deletions yann/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ def _add_resultor(self, resultor_params = None, verbose = 2):
}

if not "id" in resultor_params.keys():
id = len(self.resultor) + 1
id = str(len(self.resultor) + 1)
resultor_params["id"] = id
else:
id = resultor_params['id']
Expand Down Expand Up @@ -504,7 +504,7 @@ def _add_optimizer(self, optimizer_params, verbose = 2):
verbose: Similar to what is found in the rest of the toolbox.
"""
if not "id" in optimizer_params.keys():
id = len(self.optimizer) + 1
id = str(len(self.optimizer) + 1)
optimizer_params["id"] = id
else:
id = optimizer_params['id']
Expand All @@ -522,7 +522,7 @@ def _add_datastream(self, dataset_params, verbose = 2):
verbose: Similar to what is found in the rest of the toolbox.
"""
if not "id" in dataset_params.keys():
id = len(self.datastream) + 1
id = str(len(self.datastream) + 1)
dataset_params["id"] = id
else:
id = dataset_params['id']
Expand Down Expand Up @@ -2223,7 +2223,7 @@ def cook(self, verbose = 2, **kwargs):
if verbose >= 3:
print("... datastream not provided, assuming " + self.last_datastream_created)
datastream = self.last_datastream_created
else:
else:
if not datastream in self.datastream.keys():
raise Exception ("Datastream " + datastream + " not found.")
self.cooked_datastream = self.datastream[datastream]
Expand Down Expand Up @@ -2770,8 +2770,7 @@ def get_params (self, verbose = 2):
print "... Collecting parameters of layer " + lyr
params_list.append(p.get_value(borrow = True))
params[lyr] = params_list

return params
return params

if __name__ == '__main__':
pass

0 comments on commit 0dfa0c0

Please sign in to comment.