lude this prototxt snippet in your custom network definition:
</p>
<pre>
layer {
    name: "accuracy"
    type: "Python"
    bottom: "pred"      # These blob names may differ in your network
    bottom: "label"
    top: "accuracy"
    python_param {
        module: "digits_python_layers"  # File name
        layer: "AccuracyLayer"          # Class name
        param_str: "{\"top_k\": 1}"
    }
    include { stage: "val" }
}
</pre>
