configs/vqa_med_2019/question_categorization/default_question_categorization.yml
# Load config defining tasks for training, validation and testing.
default_configs: vqa_med_2019/default_vqa_med_2019.yml
training:
task:
categories: all
export_sample_weights: ~/data/vqa-med/answers.all.weights.csv
# Do not load and stream images!
stream_images: False
batch_size: 256
sampler:
weights: ~/data/vqa-med/answers.all.weights.csv
terminal_conditions:
loss_stop_threshold: 1.0e-3
validation:
task:
categories: all
# Do not load and stream images!
stream_images: False
batch_size: 256
pipeline:
# Predictions decoder.
prediction_decoder:
type: WordDecoder
priority: 10.1
# Use the same word mappings as label indexer.
import_word_mappings_from_globals: True
streams:
inputs: predictions
outputs: predicted_category_names
globals:
vocabulary_size: num_categories
word_mappings: category_word_mappings
# Loss
nllloss:
type: NLLLoss
priority: 10.2
targets_dim: 1
streams:
targets: category_ids
loss: loss
# Statistics.
batch_size:
type: BatchSizeStatistics
priority: 100.1
#accuracy:
# type: AccuracyStatistics
# priority: 100.2
# streams:
# targets: category_ids
precision_recall:
type: PrecisionRecallStatistics
priority: 100.3
use_word_mappings: True
show_class_scores: True
streams:
targets: category_ids
globals:
num_classes: num_categories
word_mappings: category_word_mappings
# Viewers.
viewer:
type: StreamViewer
priority: 100.4
input_streams: questions,category_names,predicted_category_names
#: pipeline