My Thank You

I have a friend who begins each prayer with the words “thank you.” She has taught me the meaning of gratitude. When we begin our prayers by being grateful for our God and all of his gifts we have…


独家优惠奖金 100% 高达 1 BTC + 180 免费旋转

Brief Introduction for Using TensorFlow Hub

TensorFlow Hub is a library for reusable machine learning modules, where a module contains a self-contained piece of a TensorFlow Graph along with its weights and assets. So It could be reused for transfer learning across different tasks.

Very easy to use for there is no need to have a clear understanding about the model architecture for retraining or inference. Just only add a small snippet of code in your program to convert it into a fantastic deep learning application. Sounds cool, right?

pip install tensorflow-hub

Note: TensorFlow 1.7 or later is also required. Here we use v1.12.

TF hub module is imported into a TF program by instantiating a Module object. This adds the module's variables to current TF graph.

After instantiating, module m can be used multiple times from tensor inputs to tensor outputs. Sometimes, module has more than one signatures that allow usage in multiple ways. In previous call, the signature parameter is omitted which is named 'default' indeed.

Tensorflow ONLY run those parts of the module that end up as dependencies of a target in

Instead of loading module from file directly, the module could be created from a URL.

To be honest, the intuition for me to have a taste on tf hub is mainly from BigGAN. It is the best GAN generator ever yet and almost improves Inception Scores by > 100 to former state-of-art model, SAGAN. This great work is revealed by DeepMind for ICLR 2019, even Ian Goodfellow has retweeted it.

Just simply summarize the main idea in the paper here and maybe detailed explanation would be in later post.

Run it and you will get something like this:

Now we have taken a quick tour for TensorFlow Hub. In my opinion, it is a friendly tool for backend developer to capture deep learning power in their programs and that’s its meaning. BUT for a algorithm developer, it’t not powerful and flexible enough since you still need to struggle to support those custom ops first. Anyway, existence of a model zoo where you can review and inspect models you have interests in is a good new to all developers. Hope TF hub will grow better!

Add a comment

Related posts:

Something to know about Jane Addams

Jane Addams known as the “mother” of social work was a pioneer American settlement activist/reformer, social worker, public philosopher, sociologist, public administrator, protester, author, and…

5 Components for a Successful Digital Marketing Strategy

Creating a digital marketing strategy is an ever-evolving endeavor. The magnitude of various options online can leave even the most talented marketers confused. Your options include search and…

Meet Setter Home Manager Jorge Pasos

Jorge has spent his career as a tradesman; as a Journeyman Carpenter and now as Field Home Manager for Setter. The Field in the Home Manager title means that Jorge is often on site making sure jobs…