keras-team / keras-preprocessing

Utilities for working with image data, text data, and sequence data.
Other
1.02k stars 444 forks source link

Should apply_transform raise an error if... #233

Open samuelpeers-mhi opened 5 years ago

samuelpeers-mhi commented 5 years ago

Should ImageDataGenerator().apply_transform raise an error if the transform_parameters don't match any of the accepted keys?

I have an autotuning script that takes in the transform_parameters as a cli argument and applies them. It fails silently (doesn't manipulate the image) when the keys aren't in the accepted list.

I'm thinking I'll check the transform_parameters against the list of accepted keys, but keeping a hard coded list of the accepted keys doesn't feel very maintainable.

rragundez commented 4 years ago

It might be a good idea to raise a warning, but I don't think it should fail.