MCPcopy
hub / github.com/hanzhanggit/StackGAN / build_placeholder

Method build_placeholder

stageI/trainer.py:51–72  ·  view source on GitHub ↗

Helper function for init_opt

(self)

Source from the content-addressed store, hash-verified

49 self.log_vars = []
50
51 def build_placeholder(self):
52 '''Helper function for init_opt'''
53 self.images = tf.placeholder(
54 tf.float32, [self.batch_size] + self.dataset.image_shape,
55 name='real_images')
56 self.wrong_images = tf.placeholder(
57 tf.float32, [self.batch_size] + self.dataset.image_shape,
58 name='wrong_images'
59 )
60 self.embeddings = tf.placeholder(
61 tf.float32, [self.batch_size] + self.dataset.embedding_shape,
62 name='conditional_embeddings'
63 )
64
65 self.generator_lr = tf.placeholder(
66 tf.float32, [],
67 name='generator_learning_rate'
68 )
69 self.discriminator_lr = tf.placeholder(
70 tf.float32, [],
71 name='discriminator_learning_rate'
72 )
73
74 def sample_encoded_context(self, embeddings):
75 '''Helper function for init_opt'''

Callers 1

init_optMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected