Skip to content
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

Inputs to eager execution function cannot be Keras symbolic tensors #15

Open
neverfox opened this issue Sep 30, 2020 · 1 comment
Open

Comments

@neverfox
Copy link

I get the following error when trying to fit the model (Tensorflow 2.3.1):

Error in py_call_impl(callable, dots$args, dots$keywords) : 
  _SymbolicException: Inputs to eager execution function cannot be Keras symbolic tensors, but found [<tf.Tensor 'repeat_vector/Tile:0' shape=(None, 9, 49) dtype=float32>] 
22.
stop(structure(list(message = "_SymbolicException: Inputs to eager execution function cannot be Keras symbolic tensors, but found [<tf.Tensor 'repeat_vector/Tile:0' shape=(None, 9, 49) dtype=float32>]", 
    call = py_call_impl(callable, dots$args, dots$keywords), 
    cppstack = structure(list(file = "", line = -1L, stack = c("1   reticulate.so                       0x000000011f3c1524 _ZN4Rcpp9exceptionC2EPKcb + 196", 
    "2   reticulate.so                       0x000000011f3c91f5 _ZN4Rcpp4stopERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE + 53",  ... 
21.
quick_execute at execute.py#74
20.
call at function.py#550
19.
_call_flat at function.py#1924
18.
_filtered_call at function.py#1848
17.
__call__ at function.py#2829
16.
_call at def_function.py#807
15.
__call__ at def_function.py#780
14.
fit at training.py#1098
13.
_method_wrapper at training.py#108
12.
(structure(function (...) 
{
    dots <- py_resolve_dots(list(...))
    result <- py_call_impl(callable, dots$args, dots$keywords) ... 
11.
do.call(object$fit, args) 
10.
fit.keras.engine.training.Model(., x = full_training_data_keras$x, 
    y = full_training_data_keras$y, validation_data = unname(validation_data_keras), 
    batch_size = 2250, epochs = 1000, callbacks = list(cb), verbose = 0) 
9.
fit(., x = full_training_data_keras$x, y = full_training_data_keras$y, 
    validation_data = unname(validation_data_keras), batch_size = 2250, 
    epochs = 1000, callbacks = list(cb), verbose = 0) 
8.
function_list[[k]](value) 
7.
withVisible(function_list[[k]](value)) 
6.
freduce(value, `_function_list`) 
5.
`_fseq`(`_lhs`) 
4.
eval(quote(`_fseq`(`_lhs`)), env, env) 
3.
eval(quote(`_fseq`(`_lhs`)), env, env) 
2.
withVisible(eval(quote(`_fseq`(`_lhs`)), env, env)) 
1.
model %>% fit(x = full_training_data_keras$x, y = full_training_data_keras$y, 
    validation_data = unname(validation_data_keras), batch_size = 2250, 
    epochs = 1000, callbacks = list(cb), verbose = 0)
@AnnaDai1001
Copy link

Hello, I am having the same error with TensorFlow2.1.0. I am wondering whether you have fixed this issue. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants