Skip to content

Commit

Permalink
Fix use_ft and use_att for topdown model.
Browse files Browse the repository at this point in the history
  • Loading branch information
ruotianluo committed Apr 18, 2019
1 parent 20c0df7 commit e3c7c94
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion misc/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ def pickle_dump(obj, f):

def if_use_feat(caption_model):
# Decide if load attention feature according to caption model
use_fc, use_att = True, True
if caption_model in ['show_tell', 'all_img', 'fc', 'newfc']:
use_att, use_fc = False, True
elif caption_model == 'language_model':
use_att, use_fc = False, False
elif caption_model == 'topdown':
use_fc, use_att = True, True
else:
use_att, use_fc = True, False
return use_fc, use_att
Expand Down

0 comments on commit e3c7c94

Please sign in to comment.