MCPcopy Index your code
hub / github.com/lisa-lab/DeepLearningTutorials / train_fn

Function train_fn

code/logistic_cg.py:240–244  ·  view source on GitHub ↗
(theta_value)

Source from the content-addressed store, hash-verified

238
239 # creates a function that computes the average cost on the training set
240 def train_fn(theta_value):
241 classifier.theta.set_value(theta_value, borrow=True)
242 train_losses = [batch_cost(i * batch_size)
243 for i in range(n_train_batches)]
244 return numpy.mean(train_losses)
245
246 # creates a function that computes the average gradient of cost with
247 # respect to theta

Callers 5

test_DBNFunction · 0.85
test_SdAFunction · 0.85
trainFunction · 0.85
trainFunction · 0.85
trainFunction · 0.85

Calls

no outgoing calls

Tested by 2

test_DBNFunction · 0.68
test_SdAFunction · 0.68