Skip to content

Commit

Permalink
minor changes to args
Browse files Browse the repository at this point in the history
  • Loading branch information
ranjaykrishna committed Mar 23, 2018
1 parent f3e4bcd commit 558ecd2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions config.py
Expand Up @@ -63,8 +63,12 @@ def parse_training_args(parser):
parser.add_argument('--model', type=str, default='ssas',
help='Indicates which model to use: '
'[co-occurrence, vrd, ssas] Check paper for details.')
parser.add_argument('--use-subject', type=int, default=1,
help='1/0 indicating whether to use the subjects.')
parser.add_argument('--use-predicate', type=int, default=1,
help='1/0 indicating whether to use the predicates.')
parser.add_argument('--use-object', type=int, default=1,
help='1/0 indicating whether to use the objects.')
parser.add_argument('--hidden-dim', type=int, default=1024,
help='Number of dimensions in the hidden unit.')
parser.add_argument('--embedding-dim', type=int, default=512,
Expand Down
3 changes: 1 addition & 2 deletions models.py
Expand Up @@ -50,7 +50,6 @@ def __init__(self, args):
self.iterations = args.iterations
self.attention_conv_kernel = args.attention_conv_kernel
self.refinement_conv_kernel = args.refinement_conv_kernel
self.upsampling_channels = args.upsampling_channels
self.output_dim = args.output_dim
self.embedding_dim = args.embedding_dim
self.finetune_cnn = args.finetune_cnn
Expand Down Expand Up @@ -142,7 +141,7 @@ def build_ssas(self):
object_att = new_object_att
subject_att = new_subject_att

# Upsample the subject and objects regions.
# Collect the subject and objects regions.
if self.use_internal_loss and self.iterations > 0:
internal_weights = np.array([self.internal_loss_weight**i for i in range(len(subject_outputs))])
internal_weights = internal_weights / internal_weights.sum()
Expand Down

0 comments on commit 558ecd2

Please sign in to comment.