Open SanoKyohei opened 1 year ago
[Original] for layer in range(self.n_layers): weight_decay_loss = 0 weight_decay_loss += tf.multiply(tf.nn.l2_loss(self.W[layer]), self.weight_decay, name='weight_loss') [Right] weight_decay_loss = 0 for layer in range(self.n_layers): weight_decay_loss += tf.multiply(tf.nn.l2_loss(self.W[layer]), self.weight_decay, name='weight_loss')
Thank you very much for the correction! We fixed this error in the new code. Due to the relatively shallow network structure, this error did not have a big impact on the results.
[Original] for layer in range(self.n_layers): weight_decay_loss = 0 weight_decay_loss += tf.multiply(tf.nn.l2_loss(self.W[layer]), self.weight_decay, name='weight_loss') [Right] weight_decay_loss = 0 for layer in range(self.n_layers): weight_decay_loss += tf.multiply(tf.nn.l2_loss(self.W[layer]), self.weight_decay, name='weight_loss')