---
dataset:
    task:
        # only supports YOLOv2
        type: mayo.task.image.YOLOv2
        num_cells: 13
        preprocess:
            validate: null
            final_cpu: null
            shape:
                height: 416
                width: 416
                channels: 3
model:
    name: tiny_yolo
    description:
        Tiny YOLO implementation from::
            https://github.com/experiencor/keras-yolo2/blob/master/backend.py
    layers:
        _conv: &conv
            type: convolution
            kernel_size: [3, 3]
            stride: 1
            padding: same
            weights_initializer:
                type: tensorflow.truncated_normal_initializer
                stddev: 0.09
            weights_regularizer:
                type: tensorflow.contrib.layers.l2_regularizer
                scale: 0.00004
            normalizer_fn: tensorflow.contrib.slim.batch_norm
            normalizer_params:
                center: true
                scale: true
                decay: 0.9997
                epsilon: 0.001
            activation_fn: tensorflow.nn.leaky_relu
            activation_params: {alpha: 0.1}
        _pool: &pool
            type: max_pool
            kernel_size: 2
            stride: 2
            padding: same
        conv1: {<<: *conv, num_outputs: 16}
        pool1: *pool
        conv2: {<<: *conv, num_outputs: 32}
        pool2: *pool
        conv3: {<<: *conv, num_outputs: 64}
        pool3: *pool
        conv4: {<<: *conv, num_outputs: 128}
        pool4: *pool
        conv5: {<<: *conv, num_outputs: 256}
        pool5: *pool
        conv6: {<<: *conv, num_outputs: 512}
        pool6: {<<: *pool, stride: 1}
        conv7: {<<: *conv, num_outputs: 1024}
        conv8: {<<: *conv, num_outputs: 1024}
        conv9:
            <<: *conv
            kernel_size: 1
            num_outputs: !arith >
                (5 + $(dataset.task.num_classes)) *
                len($(dataset.task.anchors))
            normalizer_fn: null
            activation_fn: null
    graph:
        from: input
        with: [
            conv1, pool1, conv2, pool2, conv3, pool3, conv4, pool4,
            conv5, pool5, conv6, pool6, conv7, conv8, conv9]
        to: output
