Skip to content

Developer's Guide

Mike Zhou edited this page Feb 11, 2019 · 14 revisions

NN Model Persistance

It is more convinient to train NN models using Python. However, it is more efficient to run NN models using Java. The following is such an example:

  • Train and save NN Model Save NN Model sample save_model.py

    • Step-1: Start AclfPyGateway - the Model Generation service
    • Step-2: Run save_model.py to create the NN model. The NN model is saved as ./model/saved_model.pb
  • Load the saved NN Model sample ModelPredictTest.java

    • Make sure that the classpath is properly set
	<classpathentry kind="lib" path="lib/libtensorflow-1.11.0.jar"/>
	<classpathentry kind="lib" path="lib/libtensorflow_jni-1.11.0.jar"/>

Configure Eclipse for TensorFlow Development

Back to Main Page

You can use any IDE for TensorFlow development. The following are steps to configure Eclipse on Windows for TensorfLow (Python) development.

  • Python Installation

The default TensorFlow programming language is Python. You can follow the instructions on the www.python.org page to download and install Python on your Windows env. Use the web-based installer version and default Python installation options. Finally, configure Windows System Environment Variable to add the path of Python(and Python\Scripts for tools such as Pip) to your Path.

  • PyDev Installation on Eclipse

PyDev: Python Eclipse plugin is used for the Python development. To configure, start Eclipse, click Help->Install New Software and click the Add button.

Name fill: Pydev, Location fill :http://pydev.org/updates

  • Python Interpreter Configuration

In the Eclipse menu bar, click Windows ->Preferences. In the dialog box, click pyDev->Interpreter - Python. Click the New button to select a path for python.exe.

  • TensorFlow Installation

Please follow the instructions on the Install TensorFlow page to install TensorFlow on Windows. Using the Native Pip method (without GPU) is recommended.

   pip3 install --upgrade tensorflow      // install TenforFlow
  • Py4J Installation

Py4J is used to bridge the communication between TensorFlow ML engine and InterPSS Power System Model service. Use the following command to install Py4J to your Python env on Windows:

   pip3 install --upgrade py4j