---
dataset:
    task:
        background_class: {use: false}
        preprocess:
            shape:
                height: 28
                width: 28
                channels: 1
            validate: null
            final_cpu: {type: linear_map, scale: 2.0, shift: -1.0}
model:
    name: lenet5_bn
    layers:
        _init: &init
            weights_initializer:
                type: tensorflow.truncated_normal_initializer
                stddev: 0.09
        conv0: &conv
            <<: *init
            type: convolution
            kernel_size: 5
            padding: valid
            num_outputs: 20
            # normalizer_fn: tensorflow.contrib.slim.batch_norm
            normalizer_fn: mayo.objects.normalize.custom_batch_norm
            normalizer_params:
                center: true
                scale: true
                decay: 0.9997
                epsilon: 0.001
        pool0: &pool
            type: max_pool
            kernel_size: 2
            stride: 2
            padding: valid
        conv1: {<<: *conv, num_outputs: 50}
        pool1: *pool
        flatten: {type: flatten}
        dropout: {type: dropout, keep_prob: 0.5}
        fc1: &fc {<<: *init, type: fully_connected, num_outputs: 500}
        logits:
            <<: *fc
            activation_fn: null
            num_outputs: $(dataset.task.num_classes)
    graph:
        from: input
        with: [conv0, pool0, conv1, pool1, flatten, dropout, fc1, logits]
        to: output
