Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

math.ceil where it should be math.floor #10

Open
koltenpearson opened this issue Jun 3, 2017 · 0 comments
Open

math.ceil where it should be math.floor #10

koltenpearson opened this issue Jun 3, 2017 · 0 comments

Comments

@koltenpearson
Copy link

koltenpearson commented Jun 3, 2017

in dump_filters.py, in the make_padding function

def make_padding(padding_name, conv_shape):
  if padding_name == "VALID":
    return [0, 0]
  elif padding_name == "SAME":
    return [int(math.ceil(conv_shape[0]/2)), int(math.ceil(conv_shape[1]/2))]
  else:
    sys.exit('Invalid padding name '+padding_name)

math.ceil should be replaced with math.floor in the "SAME" branch. Not doing so results in errors about the size of the padding vs the kernel size of SpatitalAveragePooling when attempting to run the model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant