Skip to content

Commit

Permalink
Debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
williampeer committed Mar 30, 2016
1 parent 77853a3 commit 9e8066c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions DNMM.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def hpc_learn_patterns_wrapper(hpc, patterns, max_training_iterations):
if out_values_row[el_index] != cur_p_row[el_index]:
learned_all = False
print "Patterns are not yet successfully learned. Learning more..."
# print "Displaying intermediary results... (output, target)"
# show_image_from(np.asarray([out_values_row], dtype=np.float32))
print "Displaying intermediary results... (output, target)"
show_image_from(np.asarray([out_values_row], dtype=np.float32))
# show_image_from(np.asarray([cur_p_row], dtype=np.float32))
print "iter:", iter_ctr
break
Expand Down
10 changes: 5 additions & 5 deletions HPC.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,31 +74,31 @@ def __init__(self, dims, connection_rate_input_ec, perforant_path, mossy_fibers,

# randomly assign about 25 % of the weights to a random connection weight
# ec_dg_weights = binomial_f(dims[1], dims[2], self.PP) * uniform_f(dims[1], dims[2])
ec_dg_weights = binomial_f(dims[1], dims[2], self.PP) * np.random.normal(0.5, 0.25, (dims[1], dims[2]))
ec_dg_weights = binomial_f(dims[1], dims[2], self.PP) * np.random.normal(0.5, 0.25 ** 2, (dims[1], dims[2]))
self.ec_dg_weights = theano.shared(name='ec_dg_weights', value=ec_dg_weights.astype(theano.config.floatX),
borrow=True)

# randomly assign all weights between the EC and CA3
# ec_ca3_weights = uniform_f(dims[1], dims[3])
ec_ca3_weights = binomial_f(dims[1], dims[3], self.PP) * np.random.normal(0.5, 0.25, (dims[1], dims[3]))
ec_ca3_weights = binomial_f(dims[1], dims[3], self.PP) * np.random.normal(0.5, 0.25 ** 2, (dims[1], dims[3]))
self.ec_ca3_weights = theano.shared(name='ec_ca3_weights', value=ec_ca3_weights.astype(theano.config.floatX),
borrow=True)

# randomly assign about 4 % of the weights to random connection weights
# dg_ca3_weights = binomial_f(dims[2], dims[3], self.MF) * uniform_f(dims[2], dims[3]) # elemwise
dg_ca3_weights = binomial_f(dims[2], dims[3], self.MF) * np.random.normal(0.9, 0.01, (dims[2], dims[3])) # elemwise
dg_ca3_weights = binomial_f(dims[2], dims[3], self.MF) * np.random.normal(0.9, 0.01 ** 2, (dims[2], dims[3])) # elemwise
self.dg_ca3_weights = theano.shared(name='dg_ca3_weights', value=dg_ca3_weights.astype(theano.config.floatX),
borrow=True)

# randomly assign 100 % of the weights between CA3 and CA3
# ca3_ca3_weights = uniform_f(dims[3], dims[3])
ca3_ca3_weights = np.random.normal(0.5, 0.25, (dims[3], dims[3]))
ca3_ca3_weights = np.random.normal(0.5, 0.25 ** 2, (dims[3], dims[3]))
self.ca3_ca3_weights = theano.shared(name='ca3_ca3_weights', value=ca3_ca3_weights.astype(theano.config.floatX),
borrow=True)

# random weight assignment, full connection rate CA3-out
# ca3_output_weights = uniform_f(dims[3], dims[4])
ca3_output_weights = np.random.normal(0.5, 0.25, (dims[3], dims[4]))
ca3_output_weights = np.random.normal(0.5, 0.25 ** 2, (dims[3], dims[4]))
self.ca3_out_weights = theano.shared(name='ca3_out_weights',
value=ca3_output_weights.astype(theano.config.floatX), borrow=True)

Expand Down

0 comments on commit 9e8066c

Please sign in to comment.