mirror of
https://github.com/yunjey/pytorch-tutorial.git
synced 2025-07-06 01:15:59 +08:00
Merge pull request #139 from justinshenk/patch-1
Remove dollar-sign prompt from code blocks
This commit is contained in:
@ -16,41 +16,41 @@ In the test phase, the encoder part is almost same as the training phase. The on
|
|||||||
|
|
||||||
#### 1. Clone the repositories
|
#### 1. Clone the repositories
|
||||||
```bash
|
```bash
|
||||||
$ git clone https://github.com/pdollar/coco.git
|
git clone https://github.com/pdollar/coco.git
|
||||||
$ cd coco/PythonAPI/
|
cd coco/PythonAPI/
|
||||||
$ make
|
make
|
||||||
$ python setup.py build
|
python setup.py build
|
||||||
$ python setup.py install
|
python setup.py install
|
||||||
$ cd ../../
|
cd ../../
|
||||||
$ git clone https://github.com/yunjey/pytorch-tutorial.git
|
git clone https://github.com/yunjey/pytorch-tutorial.git
|
||||||
$ cd pytorch-tutorial/tutorials/03-advanced/image_captioning/
|
cd pytorch-tutorial/tutorials/03-advanced/image_captioning/
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 2. Download the dataset
|
#### 2. Download the dataset
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
$ chmod +x download.sh
|
chmod +x download.sh
|
||||||
$ ./download.sh
|
./download.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 3. Preprocessing
|
#### 3. Preprocessing
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ python build_vocab.py
|
python build_vocab.py
|
||||||
$ python resize.py
|
python resize.py
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 4. Train the model
|
#### 4. Train the model
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ python train.py
|
python train.py
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 5. Test the model
|
#### 5. Test the model
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ python sample.py --image='png/example.png'
|
python sample.py --image='png/example.png'
|
||||||
```
|
```
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
Reference in New Issue
Block a user