{% extends '_skeleton.jinja' %}

{% block predict %}
    return dot(x, {% for i, wi in f.enumerate(weights) %} {% if i > 0 %},{% endif %} {{ f.round(wi) }} {% endfor %}) <= {{ bias }} ? 0 : 1;
{% endblock %}

{% block protected %}
    {% with expr = 'x[i] * wi' %}
        {% include 'dot.jinja' %}
    {% endwith %}
{% endblock %}