We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ag_if
library(tensorflow) f <- function(x) if(x > 0) x else 0 ff <- tf_function(f) #> Loaded Tensorflow version 2.8.0 ff(as_tensor(array(1))) #> Error in py_call_impl(callable, dots$args, dots$keywords): RuntimeError: Evaluation error: TypeError: true_fn and false_fn arguments to tf.cond must have the same number, type, and overall structure of return values. #> #> true_fn output: {'returned': <tf.Tensor 'cond/Identity:0' shape=(1,) dtype=float64>} #> false_fn output: {'returned': <tf.Tensor 'cond/Identity:0' shape=() dtype=float32>} #> #> Error details: #> Tensor("cond/Identity:0", shape=(1,), dtype=float64) and Tensor("cond/Identity:0", shape=(), dtype=float32) have different types #> .
Created on 2022-03-10 by the reprex package (v2.0.1)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Created on 2022-03-10 by the reprex package (v2.0.1)
The text was updated successfully, but these errors were encountered: