def test_evaluate(self): model = SingleInputModel() trainer = Trainer(model, nn.CrossEntropyLoss(), Adam(model.parameters()), metrics=[Accuracy()]) trainer.evaluate(train_x, train_y)
def test_evaluate(self, model, data): t = Trainer(model, nn.CrossEntropyLoss(), _get_optim(model)) t.evaluate(data, np_target, batch_size=128)