When using the basic example from https://malmaud.github.io/tfdocs/basic_usage/ the only way I can get it to complete without error is by suppressing the y “Variable”. This version works correctly (but the test fails):
using TensorFlow
using Base.Test
sess = Session(Graph())
x = constant(Float64[1,2])
y = Variable(Float64[3,4])
z = placeholder(Float64)
w = exp(x + z) # originally exp(x + z + -y)
init = global_variables_initializer()
res = run(sess, w, Dict(z=>Float64[1,2]))
println(res)
@test res[1] ≈ exp(-1)
Is this my error or has there been some change to Variable? I am using a custom libtensorflow.so generated locally with bazel.
Error is:
ERROR: LoadError: Tensorflow error: Status: Attempting to use uninitialized value node
[[Node: Neg = Neg[T=DT_DOUBLE, _device="/job:localhost/replica:0/task:0/cpu:0"](node)]]
Stacktrace:
[1] check_status at /home/colin/.julia/v0.6/TensorFlow/src/core.jl:459 [inlined]
[2] run(::TensorFlow.Session, ::Array{TensorFlow.Port,1}, ::Array{Any,1}, ::Array{TensorFlow.Port,1}, ::Array{Ptr{Void},1}) at /home/colin/.julia/v0.6/TensorFlow/src/run.jl:100
[3] run(::TensorFlow.Session, ::Array{TensorFlow.Tensor{Float64},1}, ::Dict{TensorFlow.Tensor{Float64},Array{Float64,1}}) at /home/colin/.julia/v0.6/TensorFlow/src/run.jl:172
[4] run(::TensorFlow.Session, ::TensorFlow.Tensor{Float64}, ::Dict{TensorFlow.Tensor{Float64},Array{Float64,1}}) at /home/colin/.julia/v0.6/TensorFlow/src/run.jl:190
[5] include_from_node1(::String) at ./loading.jl:569
[6] include(::String) at ./sysimg.jl:14
[7] process_options(::Base.JLOptions) at ./client.jl:305
[8] _start() at ./client.jl:371
while loading /home/colin/courses/deeplearn/tfx.jl