SoftMax: SoftMax

Description Super class Methods See Also

Description

Classic softmax that can be interpreted as a probability distribution over n items

For 'SoftMax$class_fun()', given the column vector of class probabilities for each point (computed by Softmax), return a vector of the classes (integers) with the highest probability for each point.

Super class

neuralnetr::ClassModule -> SoftMax

Methods

Public methods

Inherited methods

Method forward()

Usage
SoftMax$forward(Z)
Arguments
Z

a vector of pre-activations.

Returns

probabilities of the given class


Method backward()

Usage
SoftMax$backward(dLdZ)
Arguments
dLdZ

a vector of gradients dLdZ.

Returns

dLdZ


Method class_fun()

a classify function.

Usage
SoftMax$class_fun(Ypred)
Arguments
Ypred

a vector of predictions.

Returns

the index for the vector of the predicted label.


Method clone()

The objects of this class are cloneable with this method.

Usage
SoftMax$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Other activation: ReLU, Sigmoid, Tanh


frhl/neuralnetr documentation built on Nov. 9, 2020, 2:24 p.m.