class="doc_header"><code>focal_loss</code><a href="https://github.com/mnpinto/dl_pipeline/tree/master/dl_pipeline/vision/losses.py#L65" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>focal_loss</code>(<strong><code>x</code></strong>, <strong><code>y</code></strong>, <strong><code>alpha</code></strong>=<em><code>1</code></em>, <strong><code>gamma</code></strong>=<em><code>2</code></em>, <strong><code>before</code></strong>=<em><code>&lt;lambda&gt;</code></em>, <strong><code>aft