Skip to content

Conversation

sidphbot
Copy link

discard unusable images using a try..catch and subsequent length checking

sidphbot added 2 commits July 27, 2021 03:37
adding seek(0) to img_bytes , for avoiding PILunidentified image error
@pabloppp
Copy link
Contributor

To me, it would maybe make more sense to make sure that your dataset has no broken images before running any training on it, instead of silently failing on those images.
I feel like this PR adds a fix to a problem unrelated with alias-free gan, and only related to a specific dataset that should probably be fixed instead, idk 🤷

@rosinality
Copy link
Owner

I think it will be better to specify exceptions if exception handling is needed.

@sidphbot
Copy link
Author

apologies, I agree it is not related to alias-free-gan. I was just trying to make it easier to run in collab environments while I am doing that myself. it is an awesome repo ! kudos!
feel free to reject the pull request, will specify the exceptions today.

@vsemecky
Copy link

As a software developer with 25 years of experience, here's how I see it: If we know about a potential error that may occur, we should treat it. And using try/catch is the obvious choice. So I agree with @sidphbot.

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 this pull request may close these issues.

4 participants