This gist shows an initial simple demonstration of how to define a computation graph in Owl, and then execute it in Tensorflow.
- Step 1 : running OCaml script
tf_converter.ml
, which generates a filetest_cgraph.pbtxt
- Step 2 : make sure
test_cgraph.pbtxt
andexec_cgraph.py
in the same graph; make sure Tensorflow/numpy etc. is installed. - Step 3 : execute
python exec_cgraph.py
, and the expected printed output is a 3x3 matrix.
Here we only assume the python script writer knows where to find the output node (in collection "result").
There could be many posssible source of error at this stage, one of which could be incompatible tensorflow version; in that case, probably find this line in test_cgraph.pbtxt : tensorflow_version: "1.12.0"
and then change the version number.