Poplar and PopLibs
SpatialSoftMax.hpp
Go to the documentation of this file.
1// Copyright (c) 2018 Graphcore Ltd. All rights reserved.
6#ifndef poplin_SpatialSoftMax_hpp
7#define poplin_SpatialSoftMax_hpp
8
9#include <poplar/Graph.hpp>
11
12namespace popnn {
13
41std::pair<poplar::Tensor, poplar::Tensor>
43 const poplar::Tensor &fields, float temperature,
44 bool disableSoftmax = false,
45 const poplar::DebugContext &debugContext = {});
46
47} // end namespace popnn
48
49#endif // poplin_SpatialSoftMax_hpp
Non-linearity operations.
DebugContext gathers the common external parameters of the context of an operation.
Definition: DebugContext.hpp:221
This class represents a graph program to be executed on the IPU.
Definition: Graph.hpp:52
A reference to a subset of tensor elements.
Definition: Tensor.hpp:38
Program that executes a sequence of programs.
Definition: Program.hpp:77
Functions used in neural networks.
Definition: BatchNorm.hpp:14
std::pair< poplar::Tensor, poplar::Tensor > spatialSoftMax2D(poplar::Graph &graph, poplar::program::Sequence &prog, const poplar::Tensor &fields, float temperature, bool disableSoftmax=false, const poplar::DebugContext &debugContext={})
Implements a spatial softmax specialised for 2D input fields.