Skip to content
Snippets Groups Projects

Implementation of Max Pool in cpp

Merged Inna Kucher requested to merge maxPoolImplem into master
1 unresolved thread

There is a Max Pool implementation with its unit test.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
69 const std::size_t syMin = static_cast<std::size_t>(std::max(dify, signedsize(0)));
70 const std::size_t syMax = (static_cast<signedsize>(dims[3]) + dify) < 0 ? 0 : ((dims[3] + dify) > std::get<1>(params)[1] ? std::get<1>(params)[1] : dims[3] + dify);
71 const std::size_t oIndexFull = oIndex + ox*oySize + oy;
72 const std::size_t ix = ox * std::get<0>(params)[0];
73 const std::size_t iy = oy * std::get<0>(params)[1];
74
75 I poolValue(0.0);
76
77 for (unsigned int channel = 0; channel < dims[1];
78 ++channel){
79 for (unsigned int sy = syMin; sy < syMax; ++sy) {
80 for (unsigned int sx = sxMin; sx < sxMax; ++sx)
81 {
82 const I value = input[iIndex + (ix+sx)*dims[3] + (iy+sy)];
83
84 if (!valid || value > poolValue) {
  • Hello @ikucher, here the variable valid is not defined ! Looks like you may have some uncommited files ;)

    FYI, I have begun a merge with the master branch, I will take care of conflicts and merge process, can you please just commit all your local changes so that I can make your test pass ?

    Thanks in advance ! :D

  • Author Developer

    The declaration was missing : bool valid = false;

    This is fixed in commit : 99b67d87

    Edited by Inna Kucher
  • Please register or sign in to reply
  • Inna Kucher added 1 commit

    added 1 commit

    Compare with previous version

  • Inna Kucher added 1 commit

    added 1 commit

    Compare with previous version

  • Cyril Moineau added 28 commits

    added 28 commits

    • bbb02de4...039f265a - 24 commits from branch master
    • 9bab0a91 - Merge branch 'master' into maxPoolImplem
    • b2107a2f - Merge branch 'maxPoolImplem' of...
    • 4507c66d - Merge branch 'maxPoolImplem' of...
    • 6308e639 - [MaxPooling] Adapt MaxPoolImpl to latest change on attributes.

    Compare with previous version

  • Cyril Moineau approved this merge request

    approved this merge request

  • Cyril Moineau enabled an automatic merge when the pipeline for 6308e639 succeeds

    enabled an automatic merge when the pipeline for 6308e639 succeeds

  • Cyril Moineau mentioned in commit 8c5764b4

    mentioned in commit 8c5764b4

  • merged

  • Please register or sign in to reply
    Loading