def test_dmlp_predict(): X = np.random.standard_normal((10, 2)) X, = theano_floatx(X) mlp = DropoutMlp(2, [10], 1, ['tanh'], 'identity', 'squared', max_iter=10, p_dropout_inpt=.2, p_dropout_hiddens=[0.5]) mlp.predict(X)
def test_dmlp_iter_fit(): X = np.random.standard_normal((10, 2)) Z = np.random.standard_normal((10, 1)) X, Z = theano_floatx(X, Z) mlp = DropoutMlp(2, [10], 1, ['tanh'], 'identity', 'squared', max_iter=10, p_dropout_inpt=.2, p_dropout_hiddens=[0.5]) for i, info in enumerate(mlp.iter_fit(X, Z)): if i >= 10: break