This example is provided by @tachukao. It is a simple example of learning a periodic oscillator and the initial condition.
- Step 1 : running OCaml script
oscillator.ml
, which generates a fileoscillator.pbtxt
in current directory. Depending onn_steps
, this step might take a bit long - Step 2 : make sure
oscillator.pbtxt
andoscillator.py
in the same graph; make sure Tensorflow/numpy etc. is installed. - Step 3 : execute
python oscillator.py
, and the expected output in screen is a float number.
Here we only assume the python script writer knows where to find the output node (in collection "result") and the placeholder names (x0
and a
).
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.