Title: TensorFlow/Keras Integration Error: A KerasTensor cannot be used as input to a TensorFlow function #69340
Labels
comp:keras
Keras related issues
stale
This label marks the issue/pr stale - to be closed automatically if no activity
stat:awaiting response
Status - Awaiting response from author
TF 2.13
For issues related to Tensorflow 2.13
type:bug
Bug
Issue type
Build/Install
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
binary
TensorFlow version
2.13.0
Custom code
Yes
OS platform and distribution
Mac OS x86-64
Mobile device
Macbook
Python version
3.9
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current behavior?
I'm working on an image processing project using InsightFace and OpenNSFW2. I'm encountering an error with TensorFlow and Keras integration. When I try to use tf.pad on a tensor, I get the following error:
ValueError: A KerasTensor cannot be used as input to a TensorFlow function. A KerasTensor is a symbolic placeholder for a shape and dtype, used when constructing Keras Functional models or Keras Functions. You can only use it as input to a Keras layer or a Keras operation (from the namespaces
keras.layers
andkeras.operations
). You are likely doing something like:Standalone code to reproduce the issue
Relevant log output
No response
The text was updated successfully, but these errors were encountered: