How am I supposed to use the TF model garden beta API? - tensorflow

The TF garden library provides vision-related beta features in https://github.com/tensorflow/models/tree/master/official/vision/beta.
I am using this because the training of ResNet-RS model is known to be able in this library. However, the API seems to have a very different interface and internal mechanisms from the original API(image classification in particular). Especially, they are not documented and the code seems to be updated almost every day. The README.MD file contains a single sentence: This directory contains the new design of TF model garden vision framework.
Are users supposed to use the beta API? Or are they a work-in-progress and do I need to make a custom implementation? Is there documentation somewhere else?

Related

What is planned for the tf model garden?

First, thanks for a great library. While it helps with lots of great implementations, its seems that at least some parts of it do not keep up with the pace of tensorflow development.
What is planned for object detection stuff? Will tf-slim be replaced with something alive? Is tf2 support planned?
The official repository provides a collection of example implementations for SOTA models using the latest TensorFlow 2's high-level APIs.
The TensorFlow Model Garden team is actively working on providing more TensorFlow 2 models.
Please read this blog for more information.
https://blog.tensorflow.org/2020/03/introducing-model-garden-for-tensorflow-2.html
Please also check the GitHub repository to find more news.
https://github.com/tensorflow/models/tree/master/official#more-models-to-come
Please check the milestone for Object Detection API at https://github.com/tensorflow/models/milestones.
It will support TensorFlow 2 by early July.

How to use a custom model with Tensorflow Hub?

My goal is to test out Google's BERT algorithm in Google Colab.
I'd like to use a pre-trained custom model for Finnish (https://github.com/TurkuNLP/FinBERT). The model can not be found on TFHub library. I have not found a way to load model with Tensorflow Hub.
Is there a neat way to load and use a custom model with Tensorflow Hub?
Fundamentally: yes. Everyone can create the kind of models that TF Hub hosts, and I hope authors of interesting models do consider that.
For TF1 and the hub.Module format tailored to it, see
https://www.tensorflow.org/hub/tf1_hub_module#creating_a_new_module
For TF2 and its revised SavedModel format, see
https://www.tensorflow.org/hub/tf2_saved_model#creating_savedmodels_for_tf_hub
That said, a sophisticated model like BERT requires a bit of attention to export it with all bells and whistles, so it helps to have some tooling to build on. The BERT reference implementation for TF2 at https://github.com/tensorflow/models/tree/master/official/nlp/bert comes with an open-sourced export_tfhub.py script, and anyone can use that to export custom BERT instances created from that code base.
However, I understand from https://github.com/TurkuNLP/FinBERT/blob/master/nlpl_tutorial/training_bert.md#general-info that you are using Nvidia's fork of the original TF1 implementation of BERT. There are Hub modules created from the original research code, but the tooling to that end has not been open-sourced, and Nvidia doesn't seem to have added their own either.
If that's not changing, you'll probably have to resort to doing things the pedestrian way and get acquainted with their codebase and load their checkpoints into it.

Using tensorflow hub with go

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.

Deploying a custom built TensorFlow model within H2O

I am looking into using H2O to create a client-facing application from which they will be able to import data and run ML models on. As H2O only offers a limited number of models at the moment, is there any way to build custom models (an LSTM in TensorFlow, for example), import them into H2O where they can then be run just like any of H2O's included models?
It seems as though H2O's Deep Water was the nearest solution to this, but they have now discontinued its development.
In other words, is there any way to facilitate for different types of models that H2O does not support? (SVM, RNN, CNN, GAN, etc.)
Sorry, deploying non-H2O-3 models within H2O-3 is unsupported.

What is the difference between TensorFlow's contrib.slim.nets and models/slim/nets?

In Github repository, we have tensorflow/models having slim and we also have slim in tensorflow.contrib.slim
They both have similar names, functionality and structure. They provide similar nets. For example, inception_v1
any reference for this brain split?
why they did not just git sub
module? any discussion link?
which is the most usable/stable/maintained?
which is the real net used to train pre-trained data? this one or this one
which one of those two is the real slim shady?
https://github.com/tensorflow/models/blob/master/research/slim/slim_walkthrough.ipynb under the section titled Installation and setup :
Since the stable release of TF 1.0, the latest version of slim has been available as tf.contrib.slim, although, to use TF-Slim for image classification (as we do in this notebook), you also have to install the TF-Slim image models library from here.