22 #include "../gpu/linear_mapping.h"
41 void execute(
const int sliceStart,
const int sliceStop,
const int threadIdx,
const int threadCount);
60 std::map<std::string, std::string>
serialize()
const;
Real-valued vector usable by GPU.
Internal low-level GPU control API.
Operation computed on CPU.
static bool initDeserializer()
Sets up deserialization of the operation.
void beforeExecute(GraphicPipeline &gpu, const int threadCount)
Called right before the operation is executed.
std::vector< float > output
std::vector< float > partialSums
Softmax(const std::string &name="Softmax")
Creates a softmax layer.
bool acceptsVectorInput(int index=0) const
Returns true if the operation can take a GL::Vector at a specific input.
bool acceptsStorageInput(int index=0) const
Returns true if the operation can take a Storage::View at a specific input.
void afterExecute(const int threadCount)
Called right after the operation is executed.
void execute(const int sliceStart, const int sliceStop, const int threadIdx, const int threadCount)
Executes the operation body within a specific CPU thread.
void disconnect()
Assigns empty inputs and outputs.
int getAmountOfWork() const
Returns amount of work in arbitrary units to be splitted among threads.
int getInputCount() const
Returns number of operation inputs.
const std::vector< float > & getProbabilities() const
int getOutputCount() const
Returns number of operation outputs.
void setInput(Storage::View &&view, int index=0)
std::map< std::string, std::string > serialize() const
Returns a serialized representation of th operation;.
Maps a 3D tensor onto a storage.
static bool SOFTMAX_OP_DESERIALIZABLE