-
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
[TPU, keras preprocessing layer] Some Op must be a compile-time constant. #15655
Comments
I am able to reproduce the issue with TF 2.7.0 . Please find the gist here. |
Took a look. There may something we need to change in how we set up randomness for the RandomFlip layer, I will check about this. Overall, I think preferred approach here should be to apply the preprocessing layers inside a See this section of our guide which explains the choice: Note that the RandomRotation underlying op does not have TPU support (why you have This blogpost also shows an example of running preprocessing separately tf.data and prefetching: |
Thank you for your insightful guidance @mattdangerw ! I'll see the blog post and revise my code. |
Adding @wangpengmit who works on tf.random.Generator. |
|
same issue |
@wangpengmit It seems that we had a more general issue with all |
This should be now addressed by tensorflow/tensorflow@1949eec. |
Please go to TF Forum for help and support:
https://discuss.tensorflow.org/tag/keras
If you open a GitHub issue, here is our policy:
It must be a bug, a feature request, or a significant problem with the documentation (for small docs fixes please send a PR instead).
The form below must be filled out.
Here's why we have that policy:.
Keras developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.
System information.
You can collect some of this information using our environment capture script:
https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh
You can obtain the TensorFlow version with:
python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"
Describe the problem.
Hi!
TPU error raises especially with Kears preprocessing layers.
I've tried to connect two models, augmentation model that contains preprocessing layer and segmentation model.
train_step()
function code was mainly came from tensorflow official tutorial document.Describe the current behavior.
Expected to train successfully without error.
same code were tested on:
You could reproduce this error very fast
https://colab.research.google.com/drive/1LhHj1FrkZE9QnFhY-NOO8mn7aiXhZgNh?usp=sharing
Runtime - Run all
.augmentation model
to just plainConv2D
layers, the error disappeared.Describe the expected behavior.
The COLAB notebook runs without any error.
Contributing.
Standalone code to reproduce the issue.
https://colab.research.google.com/drive/1LhHj1FrkZE9QnFhY-NOO8mn7aiXhZgNh?usp=sharing
Source code / logs.
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.
NOTE: This issue is came from tensorflow/tensorflow#53051
The text was updated successfully, but these errors were encountered: