What is TensorFlow?

TensorFlow is an open-source machine learning platform for creating large-scale neural networks with many layers. It is developed by Google Brain Team and released under Apache License 2.0. You can use TensorFlow for Classification, Perception, Understanding, Discovering, Prediction and Creation.

Quick questions about TensorFlow

is written In Python, C++, CUDA
under Apache License 2.0.
is developed By Google Brain Team
Designed for creating large-scale neural networks
is Supported by Linux, macOS, Microsoft Windows, Android, JavaScript
 Current Stable release 2.1.0 / January 8, 2020;

Best TensorFlow Interview Questions

1) What is TensorFlow? Please Explain

TensorFlow is a platform where one can learn machine learning / deep learning/multilayer neural networks from the Google library. Libraries that use data science are helpful to describe complex networks in a very easy and understandable manner.

Owing to its high versatility it can be used for a variety of different prototypes ranging from research level to real products. Machine learning is used by researchers, programmers and data scientists. The goal is to provide the same set of the toolset to help collaborations for improving efficiency.

TensorFlow is one of the most famous and widely used deep learning library these days. It is developed to fill the gap between researchers and product developers. It is easy to deploy in scale and can work in the cloud and mobile devices such as iOS and Android.

2) Enlist few major features of the TensorFlow.

Below are major features of TensorFlow:

  • TensorFlow has the biggest ability is to build neural networks using which machines can develop logical thinking and learning analogous to humans.
  • It is one of the best libraries when it comes to deep learning that can describe some basic calculation processing also.
  • It can be used for all sorts of processing like pre-processing, calculation, state, data loading, output.
  • There is also Define and Run which first builds calculation processing via a graph and then collects the calculation processing also.
  • Adding to these, TensorFlow can be used to spread learning in Android as well as iOS.

3) What are the tensors ? How many types of tensors are available?

Tensors can be thought of as vectors and matrices of higher dimensions. They represent n-dimensional arrays of base data-type. Each element of a tensor is of the same data-type which is always known.

However, the shape i.e. the number of dimensions and the size of each dimension might only be known partially. Although in most of cases the shape of the tensor is known, but in some cases, it is only possible to know the shape at the graph execution.

There are many types of tensors available some of them are.

  • tf.constant
  • tf.placeholder
  • tf.SparseTensor
  • tf.Variable

All of these are immutable except for tf.Variable .

4) For what is the TensorFlow used?

TensorFlow is used for the Classification, Understanding, Perception, Prediction, Discovering, and Creation. It is widely used in the field of

  • Voice recognition
  • Image detection
  • Video detection
  • Text-based applications
  • Time series
  • Sentiment analysis

5) What are the requirements to install the TensorFlow 2?

The various Software requirements for installing the TensorFlow 2 are as follows -

  • Ubuntu 16.04 or later (64-bit)
  • 64-bit Windows 7 or later series of Windows (Only for Python 3 )
  • Raspbian 9.0 or later series of it
  • pip 19.0 or later series of it (requires Linux 2010 support)
  • macOS 10.12.6 (Sierra) or later (64-bit) (no GPU support)

6) Enlist a few major differences between the Keras,TensorFlow and PyTorch.

A few major differences between the Keras, Tensor flow and PyTorch are as follows

S. No. Criteria of classification Keras TensorFlow PyTorch
1. Based on platform Keras is an open source platform for deep learning and neural network building that is designed to run over TensorFlow The TensorFlow is an open-source library designed for dataflow programming. The PyTorch is an open source machine learning library designed for Python, which is based on Torch.
2. Based on API The Keras is designed with a high level of API and designed to run on top of TensorFlow and the PyTorch. The TensorFlow is designed to provide both high and low APIs. The PyTorch generally. operates with lower APIs.
3. Based on the Architecture Based on the readability and ease of use Keras is the best. The TensorFlow is at the middle level in between the Keras and the PyTorch on the basis of architecture. The PyTorch comes at the lowest level based on the ease of usage and readability.
4. Based on Debugging criteria The Keras, very less requires debugging. TensorFlow is at the middle level in between the PyTorch and the Keras based on Debugging criteria. The PyTorch has the best debugging facilities amongst the three

7) What is a TensorFlow.js?

Tensorflow JS is an open-source library that is used to define, train, and run machine learning models. With this library, you can run these models entirely in the browser, using JavaScript and a high-level layers API. It automatically supports WebGL and accelerates the code when a GPU is available. It allows you to import an existing, pre-trained model for inference. You can also re-train an imported model. Running a machine learning model in a browser improves the interactiveness in the client-side.

8) What are the Loaders in TensorFlow?

Loader in TensorFlow is an API that manages the TensorFlow Serviceable life cycle. It provides a common infrastructure for some machine learning algorithms. It is mainly used to load and unload Servables using standardized loader APIs. It is also used for adding algorithms and data backends. You can use it to implement load, access, unload a new type of servable machine learning model.

9) What are the activation functions in the TensorFlow?

An activation function is a function that is applied to the output of any neural layer and is then passed on to the next later as input which is known as an activation layer. It is a key part of the TensorFlow as it provides the non-linearity which is required to prevent the neural network from reducing to a mere logistic regression. The most popular activation function which is also widely used is the Rectification Linear Unit.

10) What are the servable in TensorFlow?

The Servable is one of the center attractions that helps to wrap the TensorFlow objects. It is an underlying object which is used by clients to perform operations and computations such as inference. Servable focus on the interference aspect on the interference aspect of the ML projects in a production and distributed environment. The size is key as, smaller the servable faster the load time.

11) What is the ROC curve?

ROC or receiver operating characteristics are the graphical representation of the diagnostic ability of a binary classifier system when the discrimination threshold is varied. It is a true positive rate v/s the false positive rate curve which is plotted for various threshold settings. It serves the purpose of analyzing the connection/trade-off between clinical sensitivity and specificity for a set of every possible cut-off.

12) Enlist the major differences between RNN and CNN.

The major differences between RNN and CNN are as follows

S. No. Criteria RNN CNN
1 Full form The RNN stands for Recurrent Neutral Networks. The CNN stands for Convolution Neutral Networks.
2. Based upon the  suitability The RNN is best suited for temporal data, also called as the sequential data. This is best used for processing of images, classification of images and to correlate data.
3. Based on compatibility features The feature compatibility of RNN is lesser. The CNN feature compatibility is more.
4. Based on handling input/ output The RNN is able to handle arbitrary input/output lengths. The CNN is able to handle only fixed input/output lengths.
5. Based on processing The RNN is able to use internal memory to process arbitrary sequences of inputs. CNN is a feed-forward artificial neural network.

13) What are the Pros and cons of using the TensorFlow?

TensorFlow has a lot to offer. But one must be aware of all the pros and cons.

The advantages of using TensorFlow are as follows-

  • Graphs
  • Library Management
  • Debugging
  • Scalability
  • Pipelining

Even though it might seem as TensorFlow is an all-in-all application, here are some disadvantages of it which are worth considering-

  • Missing Symbolic Loops
  • No support for Windows
  • No GPU is supported other than conventional NVidia and only language support is available.
  • Computation Speed

14) Enlist the various types of dashboards available in TensorFlow?

There are a lot of dashboards in TensorFlow. These are required to serve various purposes ranging from measurement and visualization to hyperparameter tuning. They are used to visualize the TensorFlow graphs. Some of them are-

  • Scalar Dashboard
  • Histogram
  • Distribution Dashboard
  • Image Dashboard
  • Audio Dashboard
  • Graph Explorer
  • Projector
  • Text Dashboard

15) What is Bias in TensorFlow?

Bias is a learnable parameter in Tensorflow. The machine learning model makes use of the bias variable to better math functions with a y-intercept other than zero. Bias means how for off our predictions are from real values. A bias variable helps you to adjust any low bias or high bias in your model.

16) What is a TensorFlow session?

A session in TensorFlow is used to execute graphs or a part of the graph. It is used to allocate resources for the graph and holds the actual values of intermediate results and variables. Sessions are used to run graphs as computations. It allocates the memory to stores the current value of the variable.

17) How to check the version of TensorFlow?

There is a list of different commands available in python to check the version of TensorFlow. Some of them are-

python -c 'import tensor flow as tf; print(tf.__version__)'  //For python2
python3 -c 'import tensor flow as tf; print(tf.__version__)'  //For python3

18) What is Weight initialisation in TensorFlow?

The initialization of weights is done in a random manner as this is critical for learning good mapping based on input and output in neural networks. This is necessary as the search space involving the weights is a large one and since there are multiple low minimums, the back-propagation might be trapped.

19) Explain the Model quantization in the TensorFlow.

TensorFlow provides techniques to minimize the complexity of optimizing inference. Model quantization is used for reduced precision and representations of weights and also, in some cases, activations for storage and computation. It has several benefits to the users -

  • Supporting the exquisite CPU platforms.
  • SIMD instruction capabilities are provided.

20) What are the TensorFlow Placeholders?

The Placeholders in TensorFlow are used to feed data into the graph. Placeholder serves the purpose of creating operations and building a computation graph without actually needing the graph. It is a variable to which data is assigned to a later date.

21) What is the difference between Variables and Placeholders?

The major differences between Variables and Placeholders are

S. No. Criteria Variables Placeholders
1. Based on Usage Variables are used to store the present as well as the past state of a graph. Placeholders are used to feed external data into a graph and the data is assigned to a later date.
2. Based on declaration command To declare a variable we use the tf.Variable() command. To declare a placeholder tf.placeholder() command.
3. Based on the requirement of initialization The variables are needed to be initialized before running the graph. Initialization is not required in the case of the placeholders.

22) Please explain Tensor board and specify it's Uses

The Tensor board is a tool provided by TensorFlow to help measure and visualize the needed dimensions during machine learning overflow. It enables tracking and analyzing the accuracy, projecting embedding to a lower-dimensional space, helping visualize the graph and much more. It is used for analysis and inspection of TensorFlow runs and graphs using a suite of web applications.

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related Interview Questions