def _loss(self):
# Weight decay loss
for i in range(len(self.layers)):
for var in self.layers[i].vars.values():
self.loss += FLAGS.weight_decay * tf.nn.l2_loss(var)
# Cross entropy error
self.loss += mask_mse_loss(self.outputs, tf.nn.l2_normalize(self.placeholders['labels'], dim=1),
self.placeholders['labels_mask'])
self.placeholders['labels']
I thought that it should calculate loss using weights (or features of images). Here it uses labels? why?
Thanks for reaching out. 'label' refers to the weight of each class -- not features of images nor one-hot vector.
(It's been a while so please ping me if I'm wrong)
Thanks.
Thanks for sharing codes. I would ask :
the code in models.py line189:
self.placeholders['labels'] I thought that it should calculate loss using weights (or features of images). Here it uses labels? why?
Thanks for answers! Really thank you!