paleo/layers/pool.py
def _calculate_output_shape(self):
        """Returns the output tensor shape."""
        n, h, w, c = self._inputs
        _, kernel_h, kernel_w, _ = self._kernel
        _, stride_h, stride_w, _ = self._strides
        if self._padding == 'VALID':
            out_height = int(
                math.ceil(float(h - kernel_h + 1) / float(stride_h)))
            out_width = int(
                math.ceil(float(w - kernel_w + 1) / float(stride_w)))
            self._pad_h = 0
            self._pad_w = 0
        elif self._padding == 'SAME':
            out_height = int(math.ceil(float(h) / float(stride_h)))
            out_width = int(math.ceil(float(w) / float(stride_w)))

            pad_along_height = (h - 1) * stride_h + kernel_h - h
            pad_along_width = (w - 1) * stride_w + kernel_w - w
            self._pad_h = pad_along_height // 2
            self._pad_w = pad_along_width // 2

        return [n, out_height, out_width, c]
Returns the output tensor shape.
Returns the output tensor shape.
Returns the output tensor shape .
def _calculate_output_shape(self):
        n, h, w, c = self._inputs
        _, kernel_h, kernel_w, _ = self._kernel
        _, stride_h, stride_w, _ = self._strides
        if self._padding == 'VALID':
            out_height = int(
                math.ceil(float(h - kernel_h + 1) / float(stride_h)))
            out_width = int(
                math.ceil(float(w - kernel_w + 1) / float(stride_w)))
            self._pad_h = 0
            self._pad_w = 0
        elif self._padding == 'SAME':
            out_height = int(math.ceil(float(h) / float(stride_h)))
            out_width = int(math.ceil(float(w) / float(stride_w)))
            pad_along_height = (h - 1) * stride_h + kernel_h - h
            pad_along_width = (w - 1) * stride_w + kernel_w - w
            self._pad_h = pad_along_height // 2
            self._pad_w = pad_along_width // 2
        return [n, out_height, out_width, c]
def _calculate_output_shape ( self ) : n , h , w , c = self . _inputs _ , kernel_h , kernel_w , _ = self . _kernel _ , stride_h , stride_w , _ = self . _strides if self . _padding == 'VALID' : out_height = int ( math . ceil ( float ( h - kernel_h + 1 ) / float ( stride_h ) ) ) out_width = int ( math . ceil ( float ( w - kernel_w + 1 ) / float ( stride_w ) ) ) self . _pad_h = 0 self . _pad_w = 0 elif self . _padding == 'SAME' : out_height = int ( math . ceil ( float ( h ) / float ( stride_h ) ) ) out_width = int ( math . ceil ( float ( w ) / float ( stride_w ) ) ) pad_along_height = ( h - 1 ) * stride_h + kernel_h - h pad_along_width = ( w - 1 ) * stride_w + kernel_w - w self . _pad_h = pad_along_height // 2 self . _pad_w = pad_along_width // 2 return [ n , out_height , out_width , c ]
Returns the output tensor shape.
Returns the output tensor shape .
"""Returns the output tensor shape."""
self