yashonwu commited on
Commit
5d45228
1 Parent(s): 6fea03a

modify captioning

Browse files
Files changed (1) hide show
  1. captioning/captioner.py +4 -4
captioning/captioner.py CHANGED
@@ -116,10 +116,10 @@ class Captioner():
116
  else:
117
  opt.model = model_path
118
 
119
- # if os.path.exists(infos_loc):
120
- # load existing infos
121
- with open(infos_loc, 'rb') as f:
122
- infos = cPickle.load(f)
123
 
124
  self.caption_model = infos["opt"].caption_model
125
 
 
116
  else:
117
  opt.model = model_path
118
 
119
+ if os.path.exists(infos_loc):
120
+ # load existing infos
121
+ with open(infos_loc, 'rb') as f:
122
+ infos = cPickle.load(f)
123
 
124
  self.caption_model = infos["opt"].caption_model
125