I am trying to add an extra loss to penalize some intermedia variables in the scoring function, but I notice that by calling tf.compat.v1.add_to_collection, the loss did not change. Here is one example:
With this change, I am not seeing any loss difference and seems like the extra_loss is not added to the overall loss. The square sum of hidden_layer2 should be pretty large. Is there anything we are missing?
I am trying to add an extra loss to penalize some intermedia variables in the scoring function, but I notice that by calling tf.compat.v1.add_to_collection, the loss did not change. Here is one example:
With this change, I am not seeing any loss difference and seems like the extra_loss is not added to the overall loss. The square sum of hidden_layer2 should be pretty large. Is there anything we are missing?