Exemple #1
0
def l2reg_model(cnt_features):
    return Model(network=Sequence(cnt_features=cnt_features,
                                  layers=[
                                      Dense(20),
                                      ReLu(),
                                      Dense(3),
                                      ReLu(),
                                      Dense(1),
                                  ],
                                  classifier=SigmoidBinaryClassifier(),
                                  regularizer=L2Regularizer(lambd=0.7)),
                 training=batch_gd)
Exemple #2
0
def model(cnt_features):
    return Model(network=Sequence(
        cnt_features=cnt_features,
        layers=[
            Dense(5),
            ReLu(),
            Dense(2),
            ReLu(),
            Dense(1),
        ],
        classifier=SigmoidBinaryClassifier(),
    ))
Exemple #3
0
def default_model(cnt_features):
    return Model(network=Sequence(
        cnt_features=cnt_features,
        layers=[
            Dense(20),
            ReLu(),
            Dense(3),
            ReLu(),
            Dense(1),
        ],
        classifier=SigmoidBinaryClassifier(),
    ),
                 training=batch_gd)
Exemple #4
0
def model(cnt_features):
    return Model(network=Sequence(
        cnt_features=cnt_features,
        layers=[
            Dense(25),
            ReLu(),
            Dense(12),
            ReLu(),
            Dense(6),
        ],
        classifier=SoftmaxClassifier(classes=6),
    ),
                 training=MiniBatchTraining(batch_size=32,
                                            optimizer=AdamOptimizer(0.0001),
                                            listener=CostListener()))