ADCME.jl
ADCME.jl copied to clipboard
Julia custom operator does not work when Variables are present
When there is a Variable in the upstream operations, Julia custom operator will fail.
Example: JuliaOpModule in ADCME.jl
push!(LOAD_PATH, "..")
include("../JuliaOpModule.jl")
using ADCME
import JuliaOpModule:do_it, DoIt!
x = Variable(rand(100))
y = 2x # or `y = Variable(rand(100))`
u = do_it(y)
sess = Session()
init(sess)
run(sess, u)
This is mostly due to TensorFlow C++ multithreading. It is not easy to call Julia from a non-event loop thread.