mirror of
https://github.com/yunjey/pytorch-tutorial.git
synced 2025-07-04 16:12:12 +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
|
||||
```bash
|
||||
$ git clone https://github.com/pdollar/coco.git
|
||||
$ cd coco/PythonAPI/
|
||||
$ make
|
||||
$ python setup.py build
|
||||
$ python setup.py install
|
||||
$ cd ../../
|
||||
$ git clone https://github.com/yunjey/pytorch-tutorial.git
|
||||
$ cd pytorch-tutorial/tutorials/03-advanced/image_captioning/
|
||||
git clone https://github.com/pdollar/coco.git
|
||||
cd coco/PythonAPI/
|
||||
make
|
||||
python setup.py build
|
||||
python setup.py install
|
||||
cd ../../
|
||||
git clone https://github.com/yunjey/pytorch-tutorial.git
|
||||
cd pytorch-tutorial/tutorials/03-advanced/image_captioning/
|
||||
```
|
||||
|
||||
#### 2. Download the dataset
|
||||
|
||||
```bash
|
||||
$ pip install -r requirements.txt
|
||||
$ chmod +x download.sh
|
||||
$ ./download.sh
|
||||
pip install -r requirements.txt
|
||||
chmod +x download.sh
|
||||
./download.sh
|
||||
```
|
||||
|
||||
#### 3. Preprocessing
|
||||
|
||||
```bash
|
||||
$ python build_vocab.py
|
||||
$ python resize.py
|
||||
python build_vocab.py
|
||||
python resize.py
|
||||
```
|
||||
|
||||
#### 4. Train the model
|
||||
|
||||
```bash
|
||||
$ python train.py
|
||||
python train.py
|
||||
```
|
||||
|
||||
#### 5. Test the model
|
||||
|
||||
```bash
|
||||
$ python sample.py --image='png/example.png'
|
||||
python sample.py --image='png/example.png'
|
||||
```
|
||||
|
||||
<br>
|
||||
|
Reference in New Issue
Block a user