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

no need for hard coded self.batch_size #4

Open
Shumzi opened this issue Feb 1, 2021 · 0 comments · May be fixed by #5
Open

no need for hard coded self.batch_size #4

Shumzi opened this issue Feb 1, 2021 · 0 comments · May be fixed by #5

Comments

@Shumzi
Copy link

Shumzi commented Feb 1, 2021

https://github.com/gentlemanman/fcrn_pytorch/blob/5cb562272d9939d9f9886b0fdb8768d84b998e90/fcrn.py#L51
you can just do:
batch_size = x.shape[0]
instead of hard coding it into the network.
if you hard code it, different batch sizes (e.g. in summary() or on the last batch of images) will screw up.

@Shumzi Shumzi changed the title no need for batch_size no need for hard coded self.batch_size Feb 1, 2021
@Shumzi Shumzi linked a pull request Feb 1, 2021 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant