---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-5-087663072c0b> in <module>()
----> 1 model = trainer(learning_rate=1e-4, batch_size=128, num_epoch=10, n_z=5)
<ipython-input-4-003cc8534389> in trainer(learning_rate, batch_size, num_epoch, n_z)
10
11 # training loop, batch[0] is the image, batch[1] is the label
---> 12 loss = model.run_single_stage(batch[0])
13 print '[Epoch]', epoch, 'loss', loss
14 print('Done!')
<ipython-input-3-9d30e583e2c3> in run_single_stage(self, x)
61 def run_single_stage(self, x):
62 """ execute a forward and a backward pass, report loss """
---> 63 _, loss = self.sess.run([self.train_op, self.total_loss], feed_dict={self.x: x})
64 return loss
65
/Applications/anaconda/lib/python2.7/site-packages/tensorflow/python/client/session.pyc in run(self, fetches, feed_dict, options, run_metadata)
893 try:
894 result = self._run(None, fetches, feed_dict, options_ptr,
--> 895 run_metadata_ptr)
896 if run_metadata:
897 proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)
/Applications/anaconda/lib/python2.7/site-packages/tensorflow/python/client/session.pyc in _run(self, handle, fetches, feed_dict, options, run_metadata)
1122 if final_fetches or final_targets or (handle and feed_dict_tensor):
1123 results = self._do_run(handle, final_targets, final_fetches,
-> 1124 feed_dict_tensor, options, run_metadata)
1125 else:
1126 results = []
/Applications/anaconda/lib/python2.7/site-packages/tensorflow/python/client/session.pyc in _do_run(self, handle, target_list, fetch_list, feed_dict, options, run_metadata)
1319 if handle is None:
1320 return self._do_call(_run_fn, self._session, feeds, fetches, targets,
-> 1321 options, run_metadata)
1322 else:
1323 return self._do_call(_prun_fn, self._session, handle, feeds, fetches)
/Applications/anaconda/lib/python2.7/site-packages/tensorflow/python/client/session.pyc in _do_call(self, fn, *args)
1325 def _do_call(self, fn, *args):
1326 try:
-> 1327 return fn(*args)
1328 except errors.OpError as e:
1329 message = compat.as_text(e.message)
/Applications/anaconda/lib/python2.7/site-packages/tensorflow/python/client/session.pyc in _run_fn(session, feed_dict, fetch_list, target_list, options, run_metadata)
1304 return tf_session.TF_Run(session, options,
1305 feed_dict, fetch_list, target_list,
-> 1306 status, run_metadata)
1307
1308 def _prun_fn(session, handle, feed_dict, fetch_list):
KeyboardInterrupt: