Skip to content

pooling_layer size miscalculated? #988

@yariv-c

Description

@yariv-c

Is the size of the output of a pooling layer miscalculated? Instead of:

pooled_height_ = static_cast<int>(ceil(static_cast<float>(
      height_ + 2 * pad_h_ - kernel_h_) / stride_h_)) + 1;

it should have been:

pooled_height_ = static_cast<int>(ceil(static_cast<float>(
      height_ + 2 * pad_h_ - kernel_h_ + 1) / stride_h_));

And similarly for the width.

E.g., ceil((4+2_0-3)/2)+1 != ceil((4+2_0-3+1)/2) .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions