A class for performing 2D convolution operations as part of a machine learning function. More...
#include <functions.h>
Public Member Functions | |
| Convolute (float *weights, int *dims_) | |
| Constructs a new Convolute object. | |
| void | apply (const SelectivityVector &rows, std::vector< VectorPtr > &args, const TypePtr &type, exec::EvalCtx &context, VectorPtr &output) const override |
| Applies the 2D convolution operation to the input data. | |
| float * | getTensor () const override |
| Returns the filter weights tensor. | |
| std::string | getFuncName () |
| Returns the name of the function. | |
Public Member Functions inherited from MLFunction | |
| virtual | ~MLFunction ()=default |
| Virtual destructor. | |
| virtual std::vector< int > | getDims () |
| Returns the dimensions of the function. | |
| virtual int | getNumDims () |
| Returns the number of dimensions of the function. | |
| virtual CostEstimate | getCost (std::vector< int > inputDims) |
| Estimates the computational cost of applying the function. | |
Static Public Member Functions | |
| static std::vector< std::shared_ptr< exec::FunctionSignature > > | signatures () |
| Returns the function signatures for the convolution operation. | |
| static std::string | getName () |
| Returns the name of the function. | |
Additional Inherited Members | |
Protected Member Functions inherited from MLFunction | |
| double | getWeightedCost (std::string name, float cost) |
| Calculates the weighted cost of the function. | |
| std::vector< double > | getCoefficientVector (std::string name) |
| Retrieves the cost coefficients for the function. | |
Protected Attributes inherited from MLFunction | |
| std::vector< int > | dims |
| Dimensions of the function. | |
A class for performing 2D convolution operations as part of a machine learning function.
This class implements a 2D convolution operation using Eigen for matrix operations. It supports multi-channel inputs and filters, and produces multi-channel outputs.
|
inline |
Constructs a new Convolute object.
| weights | A pointer to the filter weights. |
| dims_ | An array of dimensions describing the filters and input:
|
|
inlineoverride |
Applies the 2D convolution operation to the input data.
| rows | A SelectivityVector indicating which rows to process. |
| args | A vector of input arguments (only the first argument is used). |
| type | The type of the output vector. |
| context | The evaluation context. |
| output | The output vector where the results will be stored. |
|
inlinevirtual |
Returns the name of the function.
Reimplemented from MLFunction.
|
inlinestatic |
Returns the name of the function.
|
inlineoverridevirtual |
|
inlinestatic |
Returns the function signatures for the convolution operation.