From 1ad663b68961a2789c97c4a8dfebc2f3ac25208f Mon Sep 17 00:00:00 2001 From: Robert Nishihara Date: Thu, 8 Sep 2016 11:43:26 -0700 Subject: [PATCH] Add more print statements to lbfgs app to help debug. (#420) --- examples/lbfgs/driver.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/lbfgs/driver.py b/examples/lbfgs/driver.py index cc040b6c6..9662e8cca 100644 --- a/examples/lbfgs/driver.py +++ b/examples/lbfgs/driver.py @@ -116,9 +116,11 @@ if __name__ == "__main__": batch_size = 100 num_batches = mnist.train.num_examples / batch_size batches = [mnist.train.next_batch(batch_size) for _ in range(num_batches)] + print "Putting MNIST in the object store." batch_ids = [(ray.put(xs), ray.put(ys)) for (xs, ys) in batches] # Initialize the weights for the network to the vector of all zeros. theta_init = 1e-2 * np.random.normal(size=dim) # Use L-BFGS to minimize the loss function. + print "Running L-BFGS." result = scipy.optimize.fmin_l_bfgs_b(full_loss, theta_init, maxiter=10, fprime=full_grad, disp=True)