input signal
the edge size of the square pooling window, defaults to 2
the amount by which the pooling window is stepped (in both x and y), defaults to 2
input signal
the edge size of the square pooling window, defaults to 2
Raise a node to a fixed power.
Raise a node to a fixed power. Cog has two pow() function signatures corresponding to both integer and non-integer powers. The integer case is detected here and special-cased (instead of having a separate PowN node for this).
If the power n
is anything other than a positive integer, make sure the inputs
are always positive or NaNs will result.
the input signal
the power to raise the input to
the amount by which the pooling window is stepped (in both x and y), defaults to 2
The max pooling function with a
poolSize
xpoolSize
input field stepped bystride
. The input must be two dimensional.The ability to accomodate overlapping pools (where poolSize != stride) adds considerable complexity. In particular, the jacobianAdjoint must be prepared to sum multiple gradients (dY's) because of the potential spraying of values in the forward direction. Thus, there are two different implementation strategies taken for the two cases:
Overlapped pools: The jacobianAdjoint GPUOperator allocates one thread per element of the larger 'dX' field that it generates to more naturally handle the summing that might occur into each such element. For performance, the jacobianAdjoint GPUOperator assumes and reads in a gradient-sized "index field" that contains the field offset of the input that is the maximum of the pool. The forward operator leverages the existence of the "index field" to generate its output as well.
Non-overlapping pools: The jacobianAdjoint GPUOperator allocates one thread per element of the gradient 'dY' field and has that thread write the dY value to the appropriate 'dX' field element (no summing required). Since no "index field" is needed to help speed the jacobianAdjoint, the forward operator examines its input tile and outputs the maximum in a straightforward manner.
The current approach might run faster by using local memory, but at the risk of not being able to accommodate large strides..
input signal
the edge size of the square pooling window, defaults to 2
the amount by which the pooling window is stepped (in both x and y), defaults to 2