MCPcopy Index your code
hub / github.com/hanzhanggit/StackGAN / sampler

Method sampler

stageII/trainer.py:157–165  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

155 print("success")
156
157 def sampler(self):
158 with tf.variable_scope("g_net", reuse=True):
159 c, _ = self.sample_encoded_context(self.embeddings)
160 z = tf.random_normal([self.batch_size, cfg.Z_DIM])
161 self.fake_images = self.model.get_generator(tf.concat(1, [c, z]))
162 with tf.variable_scope("hr_g_net", reuse=True):
163 hr_c, _ = self.sample_encoded_context(self.embeddings)
164 self.hr_fake_images =\
165 self.model.hr_get_generator(self.fake_images, hr_c)
166
167 def compute_losses(self, images, wrong_images,
168 fake_images, embeddings, flag='lr'):

Callers 1

init_optMethod · 0.95

Calls 3

hr_get_generatorMethod · 0.80
get_generatorMethod · 0.45

Tested by

no test coverage detected