Python networks.conditional_discriminator() Examples
The following are 5
code examples of networks.conditional_discriminator().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
networks
, or try the search function
.
Example #1
Source File: networks_test.py From yolo_v2 with Apache License 2.0 | 5 votes |
def test_discriminator_conditional(self): batch_size = 5 image = tf.random_uniform([batch_size, 32, 32, 3], -1, 1) conditioning = (None, tf.one_hot([0] * batch_size, 10)) dis_output = networks.conditional_discriminator(image, conditioning) with self.test_session(use_gpu=True) as sess: sess.run(tf.global_variables_initializer()) dis_output_np = dis_output.eval() self.assertAllEqual([batch_size, 1], dis_output_np.shape)
Example #2
Source File: networks_test.py From Gun-Detector with Apache License 2.0 | 5 votes |
def test_discriminator_conditional(self): batch_size = 5 image = tf.random_uniform([batch_size, 32, 32, 3], -1, 1) conditioning = (None, tf.one_hot([0] * batch_size, 10)) dis_output = networks.conditional_discriminator(image, conditioning) with self.test_session(use_gpu=True) as sess: sess.run(tf.global_variables_initializer()) dis_output_np = dis_output.eval() self.assertAllEqual([batch_size, 1], dis_output_np.shape)
Example #3
Source File: networks_test.py From object_detection_with_tensorflow with MIT License | 5 votes |
def test_discriminator_conditional(self): batch_size = 5 image = tf.random_uniform([batch_size, 32, 32, 3], -1, 1) conditioning = (None, tf.one_hot([0] * batch_size, 10)) dis_output = networks.conditional_discriminator(image, conditioning) with self.test_session(use_gpu=True) as sess: sess.run(tf.global_variables_initializer()) dis_output_np = dis_output.eval() self.assertAllEqual([batch_size, 1], dis_output_np.shape)
Example #4
Source File: networks_test.py From g-tensorflow-models with Apache License 2.0 | 5 votes |
def test_discriminator_conditional(self): batch_size = 5 image = tf.random_uniform([batch_size, 32, 32, 3], -1, 1) conditioning = (None, tf.one_hot([0] * batch_size, 10)) dis_output = networks.conditional_discriminator(image, conditioning) with self.test_session(use_gpu=True) as sess: sess.run(tf.global_variables_initializer()) dis_output_np = dis_output.eval() self.assertAllEqual([batch_size, 1], dis_output_np.shape)
Example #5
Source File: networks_test.py From multilabel-image-classification-tensorflow with MIT License | 5 votes |
def test_discriminator_conditional(self): batch_size = 5 image = tf.random_uniform([batch_size, 32, 32, 3], -1, 1) conditioning = (None, tf.one_hot([0] * batch_size, 10)) dis_output = networks.conditional_discriminator(image, conditioning) with self.test_session(use_gpu=True) as sess: sess.run(tf.global_variables_initializer()) dis_output_np = dis_output.eval() self.assertAllEqual([batch_size, 1], dis_output_np.shape)