-
Notifications
You must be signed in to change notification settings - Fork 112
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
trouble using tf.where #380
Comments
use We should probably add this as an second overload to I think it comes down to our |
Many thanks, I will give this a try. |
Python tensorflow does basically have a conditional, |
Hi, trying to get a toy example with tf.where working
using TensorFlow
sess = TensorFlow.Session()
A = TensorFlow.Variable([-1,-1,-1,-1,0,-1])
B = TensorFlow.Variable([0,0,0,0,1,0])
mask = TensorFlow.equal(A,0)
C= TensorFlow.where(mask,B,A)
run(sess, TensorFlow.global_variables_initializer())
run(sess,[A,B,mask,C])
but I get this
MethodError: no method matching where(::TensorFlow.Tensor{Bool}, ::TensorFlow.Variables.Variable{Float64}, ::TensorFlow.Variables.Variable{Float64})
Closest candidates are:
where(::Any; name) at /Users/quentinvandegeer/.julia/v0.6/TensorFlow/src/ops/imported_ops.jl:3326
Stacktrace:
[1] include_string(::String, ::String) at ./loading.jl:515
Strangely if you give tf.where one boolean tensor it returns a single value
The text was updated successfully, but these errors were encountered: