def testAddFinalTrainingOpsQuantized(self, flags_mock):
   with tf.Graph().as_default():
     with tf.Session() as sess:
       bottleneck = tf.placeholder(tf.float32, [1, 1024], name='bottleneck')
       # Test creating final training op with quantization
       retrain.add_final_training_ops(5, 'final', bottleneck, 1024, True)
       self.assertIsNotNone(sess.graph.get_tensor_by_name('final:0'))
Beispiel #2
0
 def testAddFinalTrainingOps(self):
     with tf.Graph().as_default():
         with tf.Session() as sess:
             tf.placeholder(tf.float32, [1, retrain.BOTTLENECK_TENSOR_SIZE], name=retrain.BOTTLENECK_TENSOR_NAME)
             retrain.add_final_training_ops(sess.graph, 5, "final", "gt")
             self.assertIsNotNone(sess.graph.get_tensor_by_name("final:0"))
             self.assertIsNotNone(sess.graph.get_tensor_by_name("gt:0"))
Beispiel #3
0
 def testAddFinalTrainingOps(self, flags_mock):
   with tf.Graph().as_default():
     with tf.Session() as sess:
       bottleneck = tf.placeholder(
           tf.float32, [1, retrain.BOTTLENECK_TENSOR_SIZE],
           name=retrain.BOTTLENECK_TENSOR_NAME.split(':')[0])
       retrain.add_final_training_ops(5, 'final', bottleneck)
       self.assertIsNotNone(sess.graph.get_tensor_by_name('final:0'))
Beispiel #4
0
 def testAddFinalTrainingOps(self):
   with tf.Graph().as_default():
     with tf.Session() as sess:
       tf.placeholder(tf.float32, [1, retrain.BOTTLENECK_TENSOR_SIZE],
                      name=retrain.BOTTLENECK_TENSOR_NAME)
       retrain.add_final_training_ops(sess.graph, 5, 'final', 'gt')
       self.assertIsNotNone(sess.graph.get_tensor_by_name('final:0'))
       self.assertIsNotNone(sess.graph.get_tensor_by_name('gt:0'))
Beispiel #5
0
 def testAddFinalTrainingOps(self):
   with tf.Graph().as_default():
     with tf.Session() as sess:
       bottleneck = tf.placeholder(
           tf.float32, [1, retrain.BOTTLENECK_TENSOR_SIZE],
           name=retrain.BOTTLENECK_TENSOR_NAME.split(':')[0])
       retrain.add_final_training_ops(5, 'final', bottleneck)
       self.assertIsNotNone(sess.graph.get_tensor_by_name('final:0'))
Beispiel #6
0
 def testAddFinalTrainingOps(self, flags_mock):
   with tf.Graph().as_default():
     with tf.Session() as sess:
       bottleneck = tf.placeholder(
           tf.float32, [1, 1024],
           name='bottleneck')
       retrain.add_final_training_ops(5, 'final', bottleneck, 1024)
       self.assertIsNotNone(sess.graph.get_tensor_by_name('final:0'))