73 const std::string&
name,
93 std::map<std::string, std::string>
serialize()
const;
A key-value pair set storing pieces of arbitrary data (chunks) under string keys.
Stores linked GLSL programs and their associated fragment shader codes.
GLSL program to render images Makes use of default vertex attributes to pass the texture coordinates ...
Internal low-level GPU control API.
Abstract neural net operation (layer).
2D pooling operation computed on GPU.
Operator
Pooling operator specification.
bool acceptsStorageOutput(int index=0) const
Returns true if the operation can take a Storage::View at a specific output.
void setOutput(Storage::View &&storage, int outputIndex=0)
void getSampledChannels(int index, int &min, int &max) const
Retrieves range of input features channels sampled at the same time for a specific input.
Size getOutputSize(int outputIndex=0) const
Returns full size of a specific operation output.
std::map< std::string, std::string > serialize() const
Returns a serialized representation of th operation;.
void setInput(Storage::View &&storage, int inputIndex=0)
Pooling2D(const std::string &name, const Operator op, const int size, const int stride=1, const Size::Padding padding=Size::Padding::VALID)
2D pooling layer.
Storage::View getOutput(int index=0)
Returns a storage view bound to a specific operation output.
void disconnect()
Assigns empty inputs and outputs.
int getInputPadding(int index=0) const
Retrieves minimum required size of zero padding for a given input.
const Size::Padding padding
int getInputCount() const
Returns number of operation inputs.
static Operator operatorFromString(const std::string &str)
Returns a pooling operator from string.
bool acceptsStorageInput(int index=0) const
Returns true if the operation can take a Storage::View at a specific input.
void execute(TaskThread &thread, GraphicPipeline &gpu)
Executes the operation.
GL::RenderingProgram * program
static bool initDeserializer()
Sets up deserialization of the operation.
int getOutputCount() const
Returns number of operation outputs.
void prepare(GraphicPipeline &gpu, ChunkCollection &data, GL::ProgramBank &bank)
Compiles GLSL shaders.
unsigned long countTexelFetches() const
Counts (approximate) number of texels fetches.
Operation 3D input/output size.
Padding
Zero padding specification.
Generates GLSL fragment shader code sampling a local neighborhood around the current texture coordina...
Maps a 3D tensor onto a storage.
static const bool POOLING2D_OP_DESERIALIZABLE
std::string to_string(Beatmup::NNets::ActivationFunction function)
CustomPoint< numeric > min(const CustomPoint< numeric > &a, const CustomPoint< numeric > &b)
CustomPoint< numeric > max(const CustomPoint< numeric > &a, const CustomPoint< numeric > &b)
JNIEnv jobject jstring str