This example is a example of MNIST-based CNN.
- Step 1 : running OCaml script
tfgraph_train.ml
, which generates a filetf_convert_mnist.pbtxt
in current directory. - Step 2 : make sure
tf_convert_mnist.pbtxt
andtfgraph_train.py
in the same graph; make sure Tensorflow/numpy etc. is installed. - Step 3 : execute
python tf_converter_mnist.py
, and the expected output on screen is the training progress. After each 100 steps, loss value and model accuracy will be shown.
Here we only assume the python script writer knows where to find the output node (in collection "result") and the placeholder names (x:0
).
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.
Also, Tensorflow may yield some warning messages about version/dataset etc.
Current scripts may also ignore some factors like file/directory location.