chainer / chainer-chemistry

Chainer Chemistry: A Library for Deep Learning in Biology and Chemistry
MIT License
636 stars 132 forks source link

A little question #415

Open rookiecoder-chen opened 4 years ago

rookiecoder-chen commented 4 years ago

Hello, I trained my own CSV dataset by using chainer-chemistry, but I only got MAE when I used the model for prediction. How can I get the prediction value of each test data? I want to be able to compare it with the true value of my data.

corochann commented 4 years ago

You can use regressor.predict method to get predict value.

Evaluator only calculates MAE or other metrics.

rookiecoder-chen commented 4 years ago

OK, thank you very much for your reply. If I want to draw the loss or MAE in the model training process, what should I do?

corochann commented 4 years ago

Do you use Trainer to train model?

In that case you can use PlotReport, please refer this example. https://github.com/chainer/chainer/blob/90b0cd425014d31aae122f21bce20ecf23486e11/examples/mnist/train_mnist.py#L113

rookiecoder-chen commented 4 years ago

I used the model in example / own_dataset to train my own data. The model uses the run_train () method. Is it different from the Trainer?

corochann commented 4 years ago

It internally uses Trainer.

I guess you can pass below to run_train method: extensions_list=[extensions.PlotReport(['main/loss', 'validation/main/loss'], 'epoch', file_name='loss.png')] to add PlotReport extensions.

rookiecoder-chen commented 4 years ago

OK, when using CSV data for multiple label training, I found that the model only outputs one loss. How do you handle multiple label training? Will different labels affect each other?