コード例 #1
0
ファイル: summary_ops_test.py プロジェクト: flavz27/master_PA
 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)
コード例 #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)
コード例 #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))
コード例 #4
0
ファイル: summary_ops_test.py プロジェクト: flavz27/master_PA
 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))
コード例 #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))
コード例 #6
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))
コード例 #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_
コード例 #8
0
ファイル: summary_ops_test.py プロジェクト: flavz27/master_PA
 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_