Exemple #1
0
def test_tf_shallow_neural_classifier(XOR):
    """Just makes sure that this code will run; it doesn't check that
    it is creating good models.
    """
    X, y = XOR
    model = tf_shallow_neural_classifier.TfShallowNeuralClassifier(
        hidden_dim=4, hidden_activation=tf.nn.tanh, max_iter=100, eta=0.01)
    model.fit(X, y)
    model.predict(X)
    model.predict_proba(X)
Exemple #2
0
     }
 ],
 [
     torch_autoencoder.TorchAutoencoder(
         hidden_dim=5, hidden_activation=nn.ReLU(), max_iter=1,
         eta=1.0), {
             'hidden_dim': 10,
             'hidden_activation': nn.ReLU(),
             'max_iter': 10,
             'eta': 0.1
         }
 ],
 [
     tf_shallow_neural_classifier.TfShallowNeuralClassifier(
         hidden_dim=5,
         hidden_activation=tf.nn.tanh,
         max_iter=1,
         eta=1.0), {
             'hidden_dim': 10,
             'hidden_activation': tf.nn.relu,
             'max_iter': 10,
             'eta': 0.1
         }
 ],
 [
     tf_autoencoder.TfAutoencoder(hidden_dim=5,
                                  hidden_activation=tf.nn.tanh,
                                  max_iter=1,
                                  eta=1.0), {
                                      'hidden_dim': 10,
                                      'hidden_activation': tf.nn.relu,