File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
tutorials/09 - Image Captioning Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 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/'
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments