---
_import: ../lenet5.yaml
_horcuxes:
    _fixed: &fixed
        type: mayo.override.FixedPointQuantizer
        width: 8
        point: 2
    _incremental: &incremental
        type: mayo.override.IncrementalQuantizer
        intervals: [1.0]
        quantizer:
            type: mayo.override.ShiftQuantizer
            width: 4
            bias: 10
            overflow_rate: 0.0
            should_update: true
    _recentralizer: &recentralizer
        type: mayo.override.Recentralizer
        quantizer:
            type: mayo.override.FixedPointQuantizer
            width: 2
            point: 0
        mean_quantizer:
            type: mayo.override.FixedPointQuantizer
            width: 2
            point: 1
    _mixed: &mixed
        type: mayo.override.MixedQuantizer
        interval: 0.5
        reg_factor: 0.001
        index: 0
        quantizers:
            quantizer0:
                type: mayo.override.FixedPointQuantizer
                width: 2
                point: 0
            quantizer1:
                type: mayo.override.FixedPointQuantizer
                width: 8
                point: 0
model.layers:
    _playground: &playground
        # increment: *incremental
        # mixed: *mixed
        fixed: *fixed
        # empty: {type: mayo.override.EmptyOverrider}
        # dns: {type: mayo.override.DynamicNetworkSurgeryPruner}
        # random_gate: {type: mayo.override.RandomChannelGater, ratio: 0.5}
        # gate: {type: mayo.override.ChannelGater, alpha: 0.1, threshold: 0.3}
    conv0: &overrider
        overrider:
            weights: *playground
            biases: *playground
            gradient:
                weights: *playground
                error: *playground
            activation: *playground
            # activation:
            #     type: mayo.override.ChannelPruner
            #     density: 0.1
            #     should_update: true
    conv1: {<<: *overrider}
    fc1: {<<: *overrider}
    logits: {<<: *overrider}
