-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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
Stop wrapping tf.keras preprocessing layers -- reimplement them (in TF) instead. #18466
Comments
We need to reimplement all of these, right? I can start working on some of these, probably with the image preprocessing layer if that's the case |
All the layers that are currently wrapping tf.keras layers, yes. We can just copy over the code from tf.keras (which uses TF), but I'm not entirely sure what to do with custom ops (which are used for RandomZoom and RandomRotation, maybe RandomTranslation as well). For this reason it might be easier to start with the structured data preprocessing layers. Thank you :) |
Okay. I will start working on some of these. Will update the issue accordingly. Thank you |
@fchollet I have two questions regarding this:
|
I'm not 100% sure we'll need a base class, but if we do, then it should be in
My take is, let's try to do it without a base class. And we only need to implement the methods currently exposed by the Keras Core wrapped implementations. If it turns out there's a lot of redundancy in the code, we can introduce a shared base class to address it. |
Sure. Thanks for the clarification |
@fchollet so I almost finished porting the
|
We're going to support it (for backends where that is possible, like TF) in the future. This is a TODO.
It should work -- we have a number of layers that accept tuples, e.g. HashedCrossing. |
I will send a PR by tonight. I will mark it as WIP but it will give me a fair idea for all other preprocessing layers to be ported. Thank you for all the help and the support 🙏 |
This is done, right? |
In the future Keras Core will become tf.keras -- as such it should not depend on tf.keras in any way. Currently we depend on tf.keras in two ways:
The text was updated successfully, but these errors were encountered: