Each machine learning task is related with big amount of data. Analyzing a network is a complex and confusing task. To resolve that issue, Google announced launch of visualization tools called TensorBoard.

Currently that is the most useful source-code tool. Unfortunately that tool works only with TensorFlow library from the box. There is no way to feed it with json or xml logs.

Deepening  into a self-written neural network you can’t avoid any data-visualization task. For that reason you can use Tensorboard from C/C++/Java or Swift application.

How to do that, I will describe further.

As you can see at Tensorflow GitHub repository, any event and summary essences use protobuff to serialize themselves in to stream data. Protobuff is a Google written protocol-buffers protocol. It is open source and there are lots of different extensions for different languages. For Swift, there is a realization in official Apple GitHub repository. That is how it works:

  1. Build and install a Swift Protobuff package;
  2. Generate a Swift structures from a Proto descriptors;
  3. Feed the structures with your event data;
  4. Serialize the structures to a binary data;
  5. Merge all binary data to one file;
  6. Feed a TensorBoard with your log folder;

If you want, you can generate swift classes for all available proto schemes by few commands:

 

Also there is some trick, you have to merge your data with some header and footer fields. That fields have to contains some CRC32 checksum.

There is no only events available for representation, you can build graph, histograms, distribution and etc objects for visualization. You can see results at attached screens.

In result you can see pretty cross-platform Framework : TensorBoardKit wit Logger class:

And simple use for that Logger:

 

Author: Volodymyr Pavliukevych

Senior Software Engineer, Data Scientist.

Senior Software Engineer, Data Scientist.

No Comments so far.

Leave a Reply