Skip to content

Commit 0b3bc05

Browse files
authored
add installation and quick start in readme.md
1 parent b68048f commit 0b3bc05

File tree

1 file changed

+48
-1
lines changed

1 file changed

+48
-1
lines changed

README.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,54 @@ The advantages of leveraging NeuronBlocks for NLP neural network model training
5252

5353

5454
# Get Started
55-
Please refer to [Tutorial.md](Tutorial.md) and [Code documentation](https://microsoft.github.io/NeuronBlocks/).
55+
## <span id="installation">Installation</span>
56+
57+
*Note: NeuronBlocks is based on Python 3.6*
58+
59+
1. Clone this project.
60+
```bash
61+
git clone https://github.com/Microsoft/NeuronBlocks
62+
```
63+
64+
2. Install Python packages in requirements.txt by the following command.
65+
```bash
66+
pip install -r requirements.txt
67+
```
68+
69+
3. Install PyTorch (*NeuronBlocks supports PyTorch version 0.4.1 currently*).
70+
71+
For **Linux**, run the following command:
72+
```bash
73+
pip install torch==0.4.1
74+
```
75+
76+
For **Windows**, we suggest you to install PyTorch via *Conda* by following the instruction of [PyTorch](https://pytorch.org/get-started/previous-versions/).
77+
78+
79+
80+
## <span id="quick-start">Quick Start</span>
81+
82+
Get started by trying the given examples.
83+
84+
*Tips: in the following instruction, PROJECTROOT denotes the root directory of this project.*
85+
86+
```bash
87+
# get GloVe pre-trained word vectors
88+
cd PROJECT_ROOT/dataset
89+
bash get_glove.sh
90+
91+
# train
92+
cd PROJECT_ROOT
93+
python train.py --conf_path=model_zoo/demo/conf.json
94+
95+
# test
96+
python test.py --conf_path=model_zoo/demo/conf.json
97+
98+
# predict
99+
python predict.py --conf_path=model_zoo/demo/conf.json
100+
```
101+
102+
For more details, please refer to [Tutorial.md](Tutorial.md) and [Code documentation](https://microsoft.github.io/NeuronBlocks/).
56103

57104

58105
# Contribute

0 commit comments

Comments
 (0)