LogSoftmax
#include <popnn/LogSoftmax.hpp>
Log of softmax functions.
-
namespace popnn
Functions used in neural networks.
Functions
-
void logSoftmaxInPlace(poplar::Graph &graph, poplar::Tensor t, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {})
Update tensor
t
by computing log of softmax in-place.- Parameters
graph – The graph to add the operation to.
t – The tensor to apply the log of softmax to.
prog – The sequence to add the operation to.
debugContext – Optional debug information.
-
poplar::Tensor logSoftmax(poplar::Graph &graph, poplar::Tensor t, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {})
Compute the log of the softmax to tensor
t
and return the result.- Parameters
graph – The graph to add the operation to.
t – The tensor to apply the non-linearity to.
prog – The sequence to add the operation to.
debugContext – Optional debug information.
- Returns
A new tensor containing the contents of
t
with the given log of the softmax applied.
-
void logSoftmaxInPlace(poplar::Graph &graph, poplar::Tensor t, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext = {})