import numpy as np
from cnnlearn.layers.fullyconnected import FC
from cnnlearn.model import SequentialModel
from cnnlearn.cost import mse
from cnnlearn.activation import relu, sigmoid, tanh

n_iters = 100
n_samples = 5
n_features = 4
lr = 0.05

model = SequentialModel(mse)
model.append(FC(3, activation=tanh), FC(2, activation=tanh))

x = np.random.rand(n_samples, n_features)
y = np.random.randint(0, 1, size=(n_samples, 1))

model.train(x, y, n_iters, lr)

print(f"{'=' * 7} predict result {'=' * 7}")
test_x = np.random.rand(1, n_features)
print(model.predict(test_x))