All posts in: Neural networks


The Flow Inspector is tool which can help you review your TensorFlow Graph in your Swift written program.

The video below shows the default layout of the Flow Inspector debugger and main interaction process.


The Four Parts of Debugging and the Debugging Tools
There are four parts to the debugging workflow:

  1. File Navigator – where you can select bin and source files.
  2. Source section to review your code and select certain function to review.
  3. Graph section to review your graph inside Flow Inspector.
  4. Console output section to review output and errors in your program.

Flow Inspector Alpha version is available on GitHub.

If you work with Swift for TensorFlow project, sooner or later you will face the debug problem. The root of the issue is that lldb can’t get access to TensorFlow graph in you swift program.

Official documentation describes the compilation process:

Once the tensor operations are desugared, a transformation we call “partitioning” extracts the graph operations from the program and builds a new SIL function to represent the tensor code. In addition to removing the tensor operations from the host code, new calls are injected that call into our new runtime library to start up TensorFlow, rendezvous to collect any results, and send/receive values between the host and the tensor program as it runs. The bulk of the Graph Program Extraction transformation itself lives in TFPartition.cpp.

Once the tensor function is formed, it has some transformations applied to it, and is eventually emitted to a TensorFlow graph using the code in TFLowerGraph.cpp. After the TensorFlow graph is formed, we serialize it to a protobuf and encode the bits directly into the executable, making it easy to load at program runtime.

Actually the final graph is serialized into protobuf bytes and copied directly into the executable file.

I made a small debug tool, – Flow Inspector which can handle that problem.

You can find package template and readme on my GitHub page.

The application is available here.

Online demo of t-SNE visualization you can see here.
Machine learning algorithms have been put to good use in various areas for several years already. Analysis of various political events can become one of such areas. For instance, it can be used for predicting voting results, developing mechanisms for clustering the decisions made, analysis of political actors’ actions. In this article, I will try to describe the result of a research in this area.

Problem Definition  

Modern machine learning capabilities allow converting and visualizing huge amounts of data. Thereby it became possible to analyze political parties’ activities by converting voting instances that took place during 4 years into a self-organizing space of points that reflects actions of each elected official.

Each politician expressed themselves via 12 000 voting instances. Each voting instance can represent one of five possible actions (the person was absent, skipped the voting, voted approval, voted in negative, abstained).

The task is to convert the results of all voting instances into a point in the 3D Euclidean space that will reflect some considered attitude.

Read More