(self, L, step, log_freq)
| 117 | tie_weights(src=source.convs[i], trg=self.convs[i]) |
| 118 | |
| 119 | def log(self, L, step, log_freq): |
| 120 | if step % log_freq != 0: |
| 121 | return |
| 122 | |
| 123 | for k, v in self.outputs.items(): |
| 124 | L.log_histogram('train_encoder/%s_hist' % k, v, step) |
| 125 | if len(v.shape) > 2: |
| 126 | L.log_image('train_encoder/%s_img' % k, v[0], step) |
| 127 | |
| 128 | for i in range(self.num_layers): |
| 129 | L.log_param('train_encoder/conv%s' % (i + 1), self.convs[i], step) |
| 130 | L.log_param('train_encoder/fc', self.fc, step) |
| 131 | L.log_param('train_encoder/ln', self.ln, step) |
| 132 | |
| 133 | |
| 134 | class IdentityEncoder(nn.Module): |
nothing calls this directly
no test coverage detected