define_last_layer: Define the Last Layer of a Model according to Problem Type

Description Usage Arguments Value

Description

This function uses the information about a problem to define a possible last layer.

Usage

1
2
define_last_layer(info, units, only_convolutionals = FALSE,
  force_categorical = TRUE, multioutput = TRUE, ...)

Arguments

info

(environment) Problem information as returned by get_problem_info.

units

(integer) Number of output units

only_convolutionals

(logical) If TRUE, just returns convolutional layers, otherwise dense layers, Default: FALSE

force_categorical

(logical) When only 2 classes in a classification problem, one can use a softsign regression or a categorical layer, Default: TRUE

multioutput

(logical) Split the output units, each one with a loss function, Default: TRUE

...

arguments passed to other functions.

Value

A list with: - last_layer, The definition of the last layer, - output_activation, The output activation function, - loss, The loss function(s) to use for each output, - remap_classes, A mapping from the class numbers in the original images and 1:num_classes, - binarise, A logical indicating if there are only 2 classes and not using a categorical output, - num_classes, The number of classes, in a classification problem, - y_label, The set of labels in the original output image in a classification problem, - multioutput, A logical to indicate if the output is split.


neuroimaginador/dl4ni documentation built on May 3, 2019, 5:47 p.m.