在Go中使用Tensorflow Hub

I want to use pre trained models in my go application. Especially the Inception-ResNet-v2 model. This model seems to be only available via tensorflow hub (https://www.tensorflow.org/hub/).

However I could not find any documentation how to use tensorflow hub with the go language bindings for tensorflow.

How can I download and use these models in go?

So after a lot of work in the past few days I finally found a way.

At first I wanted to just use Python to do all the Tensorflow stuff and then provide the results via a rest service. However it turned out that the number of models provided by Tensorflow Hub is very small. This was a problem for me because I had to try out different models and compare them.

Thus I switched to using models from https://github.com/tensorflow/models. There are several tutorials how to export the data to .pb files. Those files can then be loaded in Go using gocv.

It requires a lot of work to convert the files, but in the end I think this is the best way to use Tensorflow models in go.