|
1 |
| -# QM9 |
| 1 | +# QM9 Regression Example |
2 | 2 |
|
3 |
| -QM9 dataset regression |
| 3 | +This example performs regression on the QM9 dataset. |
4 | 4 |
|
5 |
| -## Dependency |
| 5 | +## Dependencies |
6 | 6 |
|
7 |
| -This example depends on the following package as well as |
8 |
| -Chainer Chemistry and its dependent packages: |
| 7 | +To run the example, the following packages also need to be installed: |
9 | 8 |
|
| 9 | +- [`matplotlib`](https://matplotlib.org/) |
| 10 | +- [`seaborn`](https://seaborn.pydata.org/) |
10 | 11 | - [`scikit-learn`](http://scikit-learn.org/stable/)
|
11 | 12 |
|
12 | 13 | ## How to run the code
|
13 | 14 |
|
14 |
| -### Train the model with qm9 dataset |
| 15 | +### Training a model |
15 | 16 |
|
16 |
| -With CPU: |
| 17 | +To train a model, run the following: |
| 18 | + |
| 19 | +On the CPU: |
17 | 20 | ```angular2html
|
18 | 21 | python train_qm9.py
|
19 | 22 | ```
|
20 | 23 |
|
21 |
| -With GPU: |
| 24 | +On the GPU: |
22 | 25 | ```angular2html
|
23 | 26 | python train_qm9.py -g 0
|
24 | 27 | ```
|
25 | 28 |
|
26 |
| -### Inference with the trained model with qm9 dataset using Regressor |
27 |
| - |
28 |
| -As of v0.3.0, `Regressor` class is introduced which supports `predict` |
29 |
| -method for easier inference. |
| 29 | +### Inference using a pretrained model |
30 | 30 |
|
31 |
| -`Regressor` also supports `load_pickle` method, user may load |
32 |
| -the instance of pretrained-model using `pickle` file. |
| 31 | +As of v0.3.0, the `Regressor` class has been introduced, which provides the |
| 32 | +`predict` method for easier inference. `Regressor` also supports the |
| 33 | +`load_pickle` method, which allows for loading of a pretrained model, using the |
| 34 | +`pickle` library. |
33 | 35 |
|
34 |
| -The example implemented in `predict_qm9.py`. |
| 36 | +The perform inference using a pretrained model, run the following: |
35 | 37 |
|
36 |
| -With CPU: |
| 38 | +On the CPU: |
37 | 39 | ```
|
38 | 40 | python predict_qm9.py [-i /path/to/training/result/directory]
|
39 | 41 | ```
|
40 | 42 |
|
41 |
| -With GPU: |
| 43 | +On the GPU: |
42 | 44 | ```
|
43 | 45 | python predict_qm9.py -g 0 [-i /path/to/training/result/directory]
|
44 | 46 | ```
|
0 commit comments