Nowadays, huge companies are investing more in machine learning projects because a lot of libraries and frameworks are growing rapidly, particularly Tensorflow. Tensorflow was released in 2015 as an open-source deep learning framework.
A large number of communities have been involved in implementing more useful applications. Even Javascript is getting known for machine learning because of tensorflow.js. Every day Tensorflow releases new tools and libraries for deep learning.
Here we are going to see the top three tools for deep learning, which are really helpful for data scientists.
Tensorflow serving is used to easily deploy deep learning models into production. It does not take a lot of time to configure the model. You can check out the Tensorflow serving code in github. You’ll see that it is a popular library with 4.8K github stars. They are providing docker images to unit all software in a single container which will help you deploy in a single command.
I have listed few of the key features:
You can maintain multiple versions of models and serve multiple models at the same time.
Dynamically deploy new model versions without changing any code.
It supports A/B testing for models.
The key advantage is to expose gRPC protocol endpoints.
Here’s the example code to run Tensorflow serving.
First pull the Tensorflow serving docker image
docker pull tensorflow/serving
Start Tensorflow serving container and open the REST API port
1
2
3
4
5
6
7
8
9
docker run - t--rm - p 8501: 8501
-
v "$TESTDATA/saved\_model\_half\_plus\_two\_cpu:/models/half\_plus\_two"\\
-
e MODEL\ _NAME = half\ _plus\ _two\\
tensorflow / serving &
This is the REST API endpoint to get prediction value
http://localhost:8501/v1/models/half_plus_two:predict
Tensorflow extended is implemented by the Google team and serves as an end-to-end platform to deploy machine learning models to servers. This library has 1.2K stars in github with many developers contributing to it. Specifically, large companies like Twitter, Airbnb and GE Healthcare are using this library to deploy deep learning models into servers.
The main advantage is its open-source library, which is an important component in the RFC process. There are a total of thirteen RFC processes implemented, some of them are accepted states. Check this out here.
You can use the TFX libraries to add this functionality to your own custom components, or use them separately.
I have listed standard components of TFX:
ExampleGen
StatisticsGen
SchemaGen
ExampleValidator
Transform
Trainer
Tuner
Evaluator
InfraValidator
Pusher
BulkInferrer
You can check out the full details on components here
Key features:
Model analysis and visualization
Validating that a model can be served
Data visualization
Tensorboard is useful to see what happens during training from the browser. Tensorboard provides free storage up to ten million. The coolest part is that it is designed to run entirely offline.
You can see this sample experiment in a Tensorboard which will give you some idea of what it will look like. Importantly, we can easily share our model experiments with teammates and other external developers.
Tensorboard provides these cool features:
We can track and visualize metrics such as loss and accuracy.
Visualizing the Tensorflow model graph.
We can view histograms of weights, biases, or other tensors as they change over time.
Projects embeddings to a lower dimensional space.
We can easily display images, text, and audio data.
Use the below commands to install Tensorboard using pip3
pip3 install -U tensorboard
Command to run Tensorboard
$ tensorboard dev upload --logdir logs \\
--name "(optional) My latest experiment" \\
--description "(optional) Simple comparison of several hyperparameters"
If you are using a precompiled Tensorflow package then use the below commands
tensorboard --logdir path/to/logs