import sys
sys.path.append('..')
from common.optimizer import SGD
from common.trainer import Trainer
from dataset import spiral
from ch1_neural_network.two_layer_net import TwoLayerNet


# hyperparameter
max_epoch = 300
batch_size = 30
hidden_size = 10
learning_Rate = 1.0

x, t = spiral.load_data()
print(f'x: {x.shape}')
print(f't: {t.shape}')
model = TwoLayerNet(input_size=2, hidden_size=hidden_size, output_size=3)
optimizer = SGD(lr=learning_Rate)

trainer = Trainer(model, optimizer)
trainer.fit(x, t, max_epoch, batch_size, eval_interval=10)
trainer.plot()