DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Data Engineering
  3. AI/ML
  4. TensorFlow API Documentation | The Use of the TensorFlow API

TensorFlow API Documentation | The Use of the TensorFlow API

Let's take a look at the TensorFlow API documentation as well as explore what the TensorFlow APIs are and how they work.

Rinu Gour user avatar by
Rinu Gour
·
Sep. 07, 18 · Analysis
Like (3)
Save
Tweet
Share
6.82K Views

Join the DZone community and get the full member experience.

Join For Free

TensorFlow API Documentation

What Is TensorFlow API?

TensorFlow is similar to a python package and a lot of features are similar to that of Python, but the main core of TensorFlow is a distributed runtime. This functionality is implemented in many languages and one of them is Python.

TensorFlow API

TensorFlow API: TensorFlow Runtime Engine

This is the diagram of TensorFlow’s distributed Execution engine or the runtime engine. The other way to visualize the above diagram is to think of it as a virtual machine whose language is TensorFlow. The runtime of TensorFlow is written in the C++ language, but the front-end, as you can see, can be implemented by using various languages like C, C++, R, Java, etc. The use of these API’s in TensorFlow is explained below.

C API for TensorFlow

The only APIs having the official backing of TensorFlow are C and Python API (some parts). C APIs should be used whenever you are about to make a TensorFlow API for some other languages, as lots of languages have ways to connect with C language.

C++ API for TensorFlow

The runtime of TensorFlow is written in C++, and mostly, C++ is connected to TensorFlow through header files in tensorflow/cc. The C++ API still is in experimental stages of development, but Google commits to working with C++.

Python API for TensorFlow

Python is the most recognizable and the "main” language when it comes to TensorFlow and its development. It was one of the first languages supported by TensorFlow and still supports most of the features. It seems as though TensorFlow’s functionality defines in Python and then moves to C++.

The Python API is so diverse in nature that you will have to choose what level of API in TensorFlow you want to work on.

R API for TensorFlow

The R API for TensorFlow made by RStudio has some different approach than the traditional approach for providing API support. R API fully contains the Python API which is different from what TensorFlow goes with its APIs. But the users of R have all the access to features of Python API.

Further, one can see there are other APIs available for Java, Go, Rust, Haskel, and some of the other unofficial ones outside of TensorFlow project — C# and Julia.

APIs Inside TensorFlow Project

The API’s inside TensorFlow are still Python-based, and they have low-level options for its users such as tf.manual or tf.nnrelu, which are used to build neural network architecture. These APIs also use to aid in designing a deep neural network having higher levels of abstraction.

Using the Estimators API, you can define an interface and can deliver models to fit into the Estimator system. Canned estimators — pre-defined models — are present there, which follows the estimator conventions for e.g., LinearRegressor or DNNClassifier. The functionality available through this collection are as follows:

  • automatic checkpoints
  • automatic logging
  • separate training/evaluation/prediction
  • simplified training distribution

Tensorflow API

API in TensorFlow: API Inside TensorFlow Project

TensorFlow is offering sophisticated multi-thread, multi-queue, and queue-runner design that are used for loading data. The developers of TensorFlow delivered the Dataset API to address this issue and provide a candy interface as a bonus. The following diagram is from Google/IO, which has added XLA.

TensorFlow API

API Inside TensorFlow Project

Other known options to consider for API’s are TF-Slim, Keras, and scikit-learn.

APIs Outside TensorFlow Project

Some other TensorFlow API’s which develop outside of the TensorFlow project by Machine Learning enthusiasts. Let’s see some TensorFlow API outside TensorFlow Project:

  • TFLearn: This API shouldn’t be seen as TF Learn, which is TensorFlow’s  tf.contrib.learn. It is a separate Python package.
  • TensorLayer: It comes as a separate package and is different from what TensorFlow’s layers API has in its bag.
  • Pretty Tensor: It is actually a Google project that offers a fluent interface with chaining.
  • Sonnet: It is a project of Google’s DeepMind that features a modular approach.

So, this was all about the TensorFlow API Documentation. I hope you liked our explanation.

Conclusion

In this article, we saw what the TensorFlow APIs are and how they work. Moreover, we got to know about the TensorFlow API for different languages. In addition, we also studied how TensorFlow is different from Python and how it got its own identity in Machine Learning and Deep Neural Network areas. At last, we discussed APIs inside and outside of the TensorFlow Project. Next, we will work with MNIST in TensorFlow. Furthermore, if you have any questions, feel free to ask in the comments section. Thank you!

API TensorFlow Documentation

Published at DZone with permission of Rinu Gour. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Apache Kafka Is NOT Real Real-Time Data Streaming!
  • Choosing the Right Framework for Your Project
  • Building a RESTful API With AWS Lambda and Express
  • Using GPT-3 in Our Applications

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: