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
6 changes: 6 additions & 0 deletions configs/default/components/losses/nll_loss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ num_targets_dims: 1
# Options: NLLLoss | CrossEntropyLoss (NOT OPERATIONAL YET!)
# loss_function: NLLLoss

# When set to True, performs masking of selected samples from batch (LOADED)
use_masking: False

streams:
####################################################################
# 2. Keymappings associated with INPUT and OUTPUT streams.
Expand All @@ -23,6 +26,9 @@ streams:
# Stream containing batch of predictions (INPUT)
predictions: predictions

# Stream containing masks used for masking of selected samples from batch (INPUT)
masks: masks

# Stream containing loss (OUTPUT)
loss: loss

Expand Down
44 changes: 44 additions & 0 deletions configs/default/components/masking/join_masked_predictions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This file defines the default values for the Join Masked Predictions component.

####################################################################
# 1. CONFIGURATION PARAMETERS that will be LOADED by the component.
####################################################################

# List of input stream names, each containing batch of predictions (LOADED)
input_prediction_streams: ''

# List of input stream names, each containing batch of masks (LOADED)
input_mask_streams: ''

# List of word mapping names - those will be loaded from globals (LOADED)
input_word_mappings: ''

streams:
####################################################################
# 2. Keymappings associated with INPUT and OUTPUT streams.
####################################################################

# Stream containing batch of output strings (OUTPUT)
output_strings: output_strings

# Stream containing batch of output indices (OUTPUT)
# WARNING: As performed operations are not differentiable,
# those indices cannot be used for e.g. calculation of loss!!
output_indices: output_indices

globals:
####################################################################
# 3. Keymappings of variables that will be RETRIEVED from GLOBALS.
####################################################################

# Vocabulary used to produce output strings (RETRIEVED)
output_word_mappings: output_word_mappings

####################################################################
# 4. Keymappings associated with GLOBAL variables that will be SET.
####################################################################

####################################################################
# 5. Keymappings associated with statistics that will be ADDED.
####################################################################

40 changes: 40 additions & 0 deletions configs/default/components/masking/string_to_mask.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This file defines the default values for the String To Mask component.

####################################################################
# 1. CONFIGURATION PARAMETERS that will be LOADED by the component.
####################################################################

# Value that will be used when word is out of vocavbulary (LOADED)
# (Mask for that element will be 0 as well)
out_of_vocabulary_value: -1

streams:
####################################################################
# 2. Keymappings associated with INPUT and OUTPUT streams.
####################################################################

# Stream containing input strings (INPUT)
strings: strings

# Stream containing output masks (OUTPUT)
masks: masks

# Stream containing output indices (OUTPUT)
string_indices: string_indices

globals:
####################################################################
# 3. Keymappings of variables that will be RETRIEVED from GLOBALS.
####################################################################

# Vocabulary used to produce masks and indices (RETRIEVED)
word_mappings: word_mappings

####################################################################
# 4. Keymappings associated with GLOBAL variables that will be SET.
####################################################################

####################################################################
# 5. Keymappings associated with statistics that will be ADDED.
####################################################################

11 changes: 11 additions & 0 deletions configs/default/components/publishers/accuracy_statistics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
# 1. CONFIGURATION PARAMETERS that will be LOADED by the component.
####################################################################

# Flag indicating whether prediction are represented as distributions or indices (LOADED)
# Options: True (expects distribution for each preditions)
# False (expects indices (max args))
use_prediction_distributions: True

# When set to True, performs masking of selected samples from batch (LOADED)
use_masking: False

streams:
####################################################################
# 2. Keymappings associated with INPUT and OUTPUT streams.
Expand All @@ -15,6 +23,9 @@ streams:
# Stream containing batch of predictions (INPUT)
predictions: predictions

# Stream containing masks used for masking of selected samples from batch (INPUT)
masks: masks

globals:
####################################################################
# 3. Keymappings of variables that will be RETRIEVED from GLOBALS.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
# 1. CONFIGURATION PARAMETERS that will be LOADED by the component.
####################################################################

# Flag indicating whether prediction are represented as distributions or indices (LOADED)
# Options: True (expects distribution for each preditions)
# False (expects indices (max args))
use_prediction_distributions: True

# Flag indicating whether confusion matrix will be shown (LOADED)
show_confusion_matrix: False

Expand All @@ -13,6 +18,9 @@ show_class_scores: False
# When set to true, will use the provided word mappings as labels (LOADED)
use_word_mappings: False

# When set to True, performs masking of selected samples from batch (LOADED)
use_masking: False

streams:
####################################################################
# 2. Keymappings associated with INPUT and OUTPUT streams.
Expand All @@ -24,6 +32,9 @@ streams:
# Stream containing batch of predictions (INPUT)
predictions: predictions

# Stream containing masks used for masking of selected samples from batch (INPUT)
masks: masks

globals:
####################################################################
# 3. Keymappings of variables that will be RETRIEVED from GLOBALS.
Expand Down
14 changes: 5 additions & 9 deletions configs/mnist/default_mnist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ training:
# optimizer parameters:
optimizer:
name: Adam
lr: 0.01
lr: 0.0001
# settings parameters
terminal_conditions:
loss_stop: 1.0e-2
loss_stop: 0.05
episode_limit: 10000
epoch_limit: 10

Expand Down Expand Up @@ -45,20 +45,16 @@ pipeline:
# Loss
nllloss:
type: NLLLoss
priority: 10
priority: 10.0

# Statistics.
batch_size:
type: BatchSizeStatistics
priority: 100.1

accuracy:
type: AccuracyStatistics
priority: 100.2
priority: 100.0

precision_recall:
type: PrecisionRecallStatistics
priority: 100.3
priority: 100.1
use_word_mappings: True
show_class_scores: True
globals:
Expand Down
2 changes: 1 addition & 1 deletion configs/mnist/mnist_classification_convnet_softmax.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pipeline:

# Image classifier.
classifier:
type: SoftmaxClassifier
type: FeedForwardNetwork
priority: 3
streams:
inputs: reshaped_maps
Expand Down
Loading