This example is a example of MNIST-based CNN.
- Step 1 : running OCaml script
tfgraph_inf.ml
, which generates a filetf_convert_mnist.pbtxt
in current directory. - Step 2 : make sure
tf_convert_mnist.pbtxt
andtfgraph_inf.py
in the same graph; make sure Tensorflow/numpy etc. is installed. - Step 3 : execute
python tf_converter_mnist.py
, and the expected output in screen is an array of size[100]
, each element is a boolean value. There is also an value to indicate the inference accuracy.
Here we only assume the python script writer knows where to find the output node (in collection "result") and the placeholder names (x:0
).