Skip to content

Commit

Permalink
[Minor] clean up the code.
Browse files Browse the repository at this point in the history
  • Loading branch information
ruotianluo committed Jan 10, 2020
1 parent 8831123 commit 661b38c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 6 additions & 1 deletion opts.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import print_function
import argparse

import misc.utils as utils

def parse_opt():
parser = argparse.ArgumentParser()
Expand Down Expand Up @@ -216,6 +216,11 @@ def parse_opt():

args.structure_sample_n = args.structure_sample_n or args.train_sample_n


# Deal with feature things before anything
args.use_fc, args.use_att = utils.if_use_feat(args.caption_model)
if args.use_box: args.att_feat_size = args.att_feat_size + 5

return args


Expand Down
3 changes: 0 additions & 3 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ def add_summary_value(writer, key, value, iteration):
writer.add_scalar(key, value, iteration)

def train(opt):
# Deal with feature things before anything
opt.use_fc, opt.use_att = utils.if_use_feat(opt.caption_model)
if opt.use_box: opt.att_feat_size = opt.att_feat_size + 5

################################
# Build dataloader
Expand Down

0 comments on commit 661b38c

Please sign in to comment.