Skip to content
This repository was archived by the owner on Jul 18, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ default_configs: vqa_med_2019/c2_classification/default_c2_classification.yml
training:
problem:
batch_size: 128
terminal_conditions:
episode_limit: 1000

# Validation parameters:
validation:
Expand Down Expand Up @@ -49,7 +51,7 @@ pipeline:
# Model.
classifier:
type: FeedForwardNetwork
hidden_sizes: [500, 500]
hidden_sizes: [50]
dropout_rate: 0.5
priority: 3
streams:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ default_configs: vqa_med_2019/c4_classification/default_c4_classification.yml
# Training parameters:
training:
problem:
batch_size: 128

batch_size: 128
# Validation parameters:
validation:
problem:
Expand Down
9 changes: 5 additions & 4 deletions ptp/components/problems/image_text_to_class/vqa_med_2019.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ def __getitem__(self, index):
image_transformations_list = []
# Optional.
if 'random_affine' in self.image_preprocessing:
rotate = (-45, 135)
rotate = (-45, 80)
translate = (0.05, 0.25)
scale = (0.5, 2)
image_transformations_list.append(transforms.RandomAffine(rotate, translate, scale))
Expand Down Expand Up @@ -511,9 +511,10 @@ def predict_yes_no(self, qtext):
Determines whether this is binary (yes/no) type of question.
"""
yes_no_starters = ['is','was','are','does']
tokens = qtext.split(' ')
first_token = tokens[0]
if first_token in yes_no_starters and ('or' not in tokens):
if 'tokenize' not in self.question_preprocessing:
qtext = qtext.split(' ')
first_token = qtext[0]
if first_token in yes_no_starters and ('or' not in qtext):
return True
return False

Expand Down