Skip to content

Commit

Permalink
resnet stackGI
Browse files Browse the repository at this point in the history
  • Loading branch information
zsdonghao committed Jan 31, 2017
1 parent ed2dde6 commit c6f241e
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 361 deletions.
3 changes: 2 additions & 1 deletion data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
print(" * %d x %d captions found " % (len(captions_dict), len(lines)))

## build vocab
_ = tl.nlp.create_vocab(processed_capts, word_counts_output_file=VOC_FIR, min_word_count=1)
if not os.path.isfile('vocab.txt'):
_ = tl.nlp.create_vocab(processed_capts, word_counts_output_file=VOC_FIR, min_word_count=1)
vocab = tl.nlp.Vocabulary(VOC_FIR, start_word="<S>", end_word="</S>", unk_word="<UNK>")

## store all captions ids in list
Expand Down
Loading

0 comments on commit c6f241e

Please sign in to comment.