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

Method define_summaries

stageI/trainer.py:190–203  ·  view source on GitHub ↗

Helper function for init_opt

(self)

Source from the content-addressed store, hash-verified

188 self.log_vars.append(("d_learning_rate", self.discriminator_lr))
189
190 def define_summaries(self):
191 '''Helper function for init_opt'''
192 all_sum = {'g': [], 'd': [], 'hist': []}
193 for k, v in self.log_vars:
194 if k.startswith('g'):
195 all_sum['g'].append(tf.scalar_summary(k, v))
196 elif k.startswith('d'):
197 all_sum['d'].append(tf.scalar_summary(k, v))
198 elif k.startswith('hist'):
199 all_sum['hist'].append(tf.histogram_summary(k, v))
200
201 self.g_sum = tf.merge_summary(all_sum['g'])
202 self.d_sum = tf.merge_summary(all_sum['d'])
203 self.hist_sum = tf.merge_summary(all_sum['hist'])
204
205 def visualize_one_superimage(self, img_var, images, rows, filename):
206 stacked_img = []

Callers 1

init_optMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected