Skip to content

Commit ba7d546

Browse files
committed
config and download script are added
1 parent 4fc2b1f commit ba7d546

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
class Config(object):
2+
"""Wrapper class for hyper-parameters."""
3+
def __init__(self):
4+
"""Set the default hyper-parameters."""
5+
# Preprocessing
6+
self.image_size = 256
7+
self.crop_size = 224
8+
self.word_count_threshold = 4
9+
self.num_threads = 2
10+
11+
# Training
12+
self.num_epochs = 5
13+
self.batch_size = 64
14+
self.learning_rate = 0.001
15+
self.log_step = 10
16+
self.save_step = 1000
17+
18+
# Model
19+
self.embed_size = 256
20+
self.hidden_size = 512
21+
self.num_layers = 2
22+
23+
# Path
24+
self.image_path = './data/'
25+
self.caption_path = './data/annotations/'
26+
self.vocab_path = './data/'
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
wget http://msvocds.blob.core.windows.net/annotations-1-0-3/captions_train-val2014.zip -P data/
2+
wget http://msvocds.blob.core.windows.net/coco2014/train2014.zip -P data/
3+
wget http://msvocds.blob.core.windows.net/coco2014/val2014.zip -P data/
4+
5+
unzip data/captions_train-val2014.zip -d data/
6+
unzip data/train2014.zip -d data/
7+
rm data/train2014.zip
8+
unzip data/val2014.zip -d data/
9+
rm data/val2014.zip

0 commit comments

Comments
 (0)