Conv((1, 1, 16), **conv),
        Pooling(8, op="avg"),
        Activation(Softmax())
    ]

    cost = GeneralizedCost(costfunc=CrossEntropyMulti())

    mlp = Model(layers=layers)

    # configure callbacks
    callbacks = Callbacks(mlp)

    def do_nothing(_):
        pass

    callbacks.callbacks = []
    callbacks.on_train_begin = do_nothing
    callbacks.on_epoch_end = do_nothing

    mlp.fit(train_set,
            optimizer=opt_gdm,
            num_epochs=num_epochs,
            cost=cost,
            callbacks=callbacks)
    opt_metric = 1.0 - mlp.eval(valid_set, metric=Misclassification())
    print('Metric = {}'.format(opt_metric))
    conn.experiments(experiment.id).observations().create(
        suggestion=suggestion.id,
        value=float(opt_metric[0]),
    )