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

Slightly confusing part in Conv _set_padding() #3

Open
greed2411 opened this issue Sep 5, 2018 · 1 comment
Open

Slightly confusing part in Conv _set_padding() #3

greed2411 opened this issue Sep 5, 2018 · 1 comment
Labels
good first issue Good for newcomers

Comments

@greed2411
Copy link

greed2411 commented Sep 5, 2018

I was just going through source code and found this snippet in core.py:

        if p == 'half': f = 0.5
        elif p == 'same': f = 1
        elif p == 'double':
            self._upsample = 2
            if self._args['c'] is None:
                self._args['c'] = in_shape[1] // 2
            f = 1
        else: return

s = 1 / f

where f doesn't seem to be a meaningful way of addressing the padding method.

Better naming conventions could be possible, I guess.

@svaisakh svaisakh changed the title naming of variables with meaning Slightly confusing part in Conv _set_padding() Sep 5, 2018
@svaisakh svaisakh added the good first issue Good for newcomers label Sep 5, 2018
@svaisakh
Copy link
Collaborator

svaisakh commented Sep 5, 2018

I agree.

I think this could be refactored from scratch.

Beginners will not find it difficult.

I found this tutorial to be a good resource when writing this.
Helps with the mathematics of shape.

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

No branches or pull requests

2 participants