You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And I am getting the same error as in my use case.
System information
OS Platform and Distribution (e.g., CentOS 7.6):
Python version: 3.10.14
DeepTables version: 0.2.6
Other Python packages(run pip list):
tensorflow 2.8.0
Describe the current behavior
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 and keras.operations). You are likely doing something like:
x = Input(...)
...
tf_fn(x) # Invalid.
What you should do instead is wrap tf_fn in a layer:
class MyLayer(Layer):
def call(self, x):
return tf_fn(x)
x = MyLayer()(x)`
**Standalone code to reproduce the issue**
Provide a reproducible test case that is the bare minimum necessary to generate
the problem. If possible, please share a link to Jupyter notebook.
The text was updated successfully, but these errors were encountered:
After messing around, I could not use the package on my case. So I tried to run locally your your binary classification example from here: https://deeptables.readthedocs.io/en/latest/examples.html#binary-classification
And I am getting the same error as in my use case.
System information
pip list
):Describe the current behavior
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:What you should do instead is wrap
tf_fn
in a layer:The text was updated successfully, but these errors were encountered: