MCPcopy Create free account
hub / github.com/WendyShang/flare / log

Method log

encoder.py:258–270  ·  view source on GitHub ↗
(self, L, step, log_freq)

Source from the content-addressed store, hash-verified

256 tie_weights(src=source.convs[i], trg=self.convs[i])
257
258 def log(self, L, step, log_freq):
259 if step % log_freq != 0:
260 return
261
262 for k, v in self.outputs.items():
263 L.log_histogram('train_encoder/%s_hist' % k, v, step)
264 if len(v.shape) > 2:
265 L.log_image('train_encoder/%s_img' % k, v[0], step)
266
267 for i in range(self.num_layers):
268 L.log_param('train_encoder/conv%s' % (i + 1), self.convs[i], step)
269 L.log_param('train_encoder/fc', self.fc, step)
270 L.log_param('train_encoder/ln', self.ln, step)
271
272
273_AVAILABLE_ENCODERS = {'pixel': PixelEncoder, 'identity': IdentityEncoder, 'pixel_delta2d': PixelDelta2DEncoder}

Callers

nothing calls this directly

Calls 3

log_histogramMethod · 0.80
log_imageMethod · 0.80
log_paramMethod · 0.80

Tested by

no test coverage detected