tensorflow / benchmarks

A benchmark framework for Tensorflow
Apache License 2.0
1.15k stars 632 forks source link

Why need L2_loss? #468

Closed zhao1157 closed 4 years ago

zhao1157 commented 4 years ago

In calculating loss, why do we need an additional L2_loss? Is it needed for all models, including the models included in benchmark_cnn?

reedwm commented 4 years ago

L2 loss helps avoid overfitting. It's a form of weight regularization, and it useful for most models. Here's a blog post that describes it.