Ejemplo n.º 1
0
 def testEagerMemory(self):
     training_util.get_or_create_global_step()
     logdir = self.get_temp_dir()
     with summary_ops.create_file_writer(
             logdir, max_queue=0,
             name='t0').as_default(), summary_ops.always_record_summaries():
         summary_ops.generic('tensor', 1, '')
         summary_ops.scalar('scalar', 2.0)
         summary_ops.histogram('histogram', [1.0])
         summary_ops.image('image', [[[[1.0]]]])
         summary_ops.audio('audio', [[1.0]], 1.0, 1)
Ejemplo n.º 2
0
 def testEagerMemory(self):
   training_util.get_or_create_global_step()
   logdir = self.get_temp_dir()
   with summary_ops.create_file_writer(
       logdir, max_queue=0,
       name='t0').as_default(), summary_ops.always_record_summaries():
     summary_ops.generic('tensor', 1, '')
     summary_ops.scalar('scalar', 2.0)
     summary_ops.histogram('histogram', [1.0])
     summary_ops.image('image', [[[[1.0]]]])
     summary_ops.audio('audio', [[1.0]], 1.0, 1)
Ejemplo n.º 3
0
 def testSummaryOps(self):
   training_util.get_or_create_global_step()
   logdir = tempfile.mkdtemp()
   with summary_ops.create_file_writer(
       logdir, max_queue=0,
       name='t0').as_default(), summary_ops.always_record_summaries():
     summary_ops.generic('tensor', 1, '')
     summary_ops.scalar('scalar', 2.0)
     summary_ops.histogram('histogram', [1.0])
     summary_ops.image('image', [[[[1.0]]]])
     summary_ops.audio('audio', [[1.0]], 1.0, 1)
     # The working condition of the ops is tested in the C++ test so we just
     # test here that we're calling them correctly.
     self.assertTrue(gfile.Exists(logdir))
Ejemplo n.º 4
0
 def testSummaryOps(self):
     training_util.get_or_create_global_step()
     logdir = tempfile.mkdtemp()
     with summary_ops.create_file_writer(
             logdir, max_queue=0,
             name='t0').as_default(), summary_ops.always_record_summaries():
         summary_ops.generic('tensor', 1, '')
         summary_ops.scalar('scalar', 2.0)
         summary_ops.histogram('histogram', [1.0])
         summary_ops.image('image', [[[[1.0]]]])
         summary_ops.audio('audio', [[1.0]], 1.0, 1)
         # The working condition of the ops is tested in the C++ test so we just
         # test here that we're calling them correctly.
         self.assertTrue(gfile.Exists(logdir))
Ejemplo n.º 5
0
 def testSummaryOps(self):
     logdir = self.get_temp_dir()
     writer = summary_ops.create_file_writer(logdir, max_queue=0)
     with writer.as_default(), summary_ops.always_record_summaries():
         summary_ops.generic('tensor', 1, step=1)
         summary_ops.scalar('scalar', 2.0, step=1)
         summary_ops.histogram('histogram', [1.0], step=1)
         summary_ops.image('image', [[[[1.0]]]], step=1)
         summary_ops.audio('audio', [[1.0]], 1.0, 1, step=1)
     with self.cached_session() as sess:
         sess.run(summary_ops.summary_writer_initializer_op())
         sess.run(summary_ops.all_summary_ops())
     # The working condition of the ops is tested in the C++ test so we just
     # test here that we're calling them correctly.
     self.assertTrue(gfile.Exists(logdir))
 def testSummaryOps(self):
   logdir = self.get_temp_dir()
   writer = summary_ops.create_file_writer(logdir, max_queue=0)
   with writer.as_default(), summary_ops.always_record_summaries():
     summary_ops.generic('tensor', 1, step=1)
     summary_ops.scalar('scalar', 2.0, step=1)
     summary_ops.histogram('histogram', [1.0], step=1)
     summary_ops.image('image', [[[[1.0]]]], step=1)
     summary_ops.audio('audio', [[1.0]], 1.0, 1, step=1)
   with self.cached_session() as sess:
     sess.run(summary_ops.summary_writer_initializer_op())
     sess.run(summary_ops.all_summary_ops())
   # The working condition of the ops is tested in the C++ test so we just
   # test here that we're calling them correctly.
   self.assertTrue(gfile.Exists(logdir))
Ejemplo n.º 7
0
 def adder(x, y):
   state_ops.assign_add(step, 1)
   summary_ops.generic('x', x)
   summary_ops.generic('y', y)
   sum_ = x + y
   summary_ops.generic('sum', sum_)
   return sum_
Ejemplo n.º 8
0
 def adder(x, y):
     state_ops.assign_add(step, 1)
     summary_ops.generic('x', x)
     summary_ops.generic('y', y)
     sum_ = x + y
     summary_ops.generic('sum', sum_)
     return sum_