fundamentalvision / Uni-Perceiver

Apache License 2.0
256 stars 21 forks source link

Why should accuracy be used as loss? #2

Closed onepeachbiubiubiu closed 1 year ago

onepeachbiubiubiu commented 1 year ago

It seems 'argmax function' in accuracy calculation cannot backpropagate the gradient,so why accuracy be used as loss?

Lechatelia commented 1 year ago

As you said, the accuracy doesn't backpropagate any gradient; removing it from the training configuration will not affect the training results. In fact, we just calculate training accuracy like a loss calculation and then write its result into the log files and tensorboard as a monitoring metric.