ranking
ranking copied to clipboard
The keras example "keras_dnn_tfrecord.py" got an tensorflow.python.framework.errors_impl.OperatorNotAllowedInGraphError
tensorflow version: 2.8.0, tensorflow-ranking version: 0.5.0
The Trace error
Traceback (most recent call last):
File "keras_dnn_tfrecord.py", line 225, in <module>
app.run(main)
File "/home/jack/Jupyter/tensorflow/.env/lib/python3.7/site-packages/absl/app.py", line 312, in run
_run_main(main, args)
File "/home/jack/Jupyter/tensorflow/.env/lib/python3.7/site-packages/absl/app.py", line 258, in _run_main
sys.exit(main(argv))
File "keras_dnn_tfrecord.py", line 219, in main
train_and_eval()
File "keras_dnn_tfrecord.py", line 215, in train_and_eval
ranking_pipeline.train_and_validate()
File "/home/jack/Jupyter/tensorflow/.env/lib/python3.7/site-packages/tensorflow_ranking/python/keras/pipeline.py", line 615, in train_and_validate
verbose=verbose)
File "/home/jack/Jupyter/tensorflow/.env/lib/python3.7/site-packages/keras/utils/traceback_utils.py", line 67, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/home/jack/Jupyter/tensorflow/.env/lib/python3.7/site-packages/keras/engine/training.py", line 1061, in train_function
for _ in tf.range(self._steps_per_execution):
tensorflow.python.framework.errors_impl.OperatorNotAllowedInGraphError: iterating over `tf.Tensor` is not allowed: AutoGraph did convert this function. This might indicate you are trying to use an unsupported feature.
Why I got this error? thanks!
Hi Jack, are you just running the keras_dnn_tfrecord.py
with default parameters? It appears to me a TensorFlow issue. Let me investigate a bit.
Hi Jack, are you just running the
keras_dnn_tfrecord.py
with default parameters? It appears to me a TensorFlow issue. Let me investigate a bit.
Yes, But I didn't run keras_dnn_tfrecord.py
with bazel. I run with the command :
python3 keras_dnn_tfrecord.py --train_input_pattern ../data/train_numerical_elwc.tfrecord --valid_input_pattern ../data/vali_numerical_elwc.tfrecord --test_input_pattern ../data/test_numerical_elwc.tfrecord --dropout 0.4 --model_dir ./output
Thanks.