Top 10 Tensorflow Interview Questions And Answers

 

1) What is TensorFlow?

TensorFlow is an open source machine learning framework. It is used for implementing machine learning and deep learning applications. TensorFlow is designed in Python programming language so it is easy to understand and learn. TensorFlow is designed by Google which is well-documented and includes plenty of machine learning libraries.


2) What are the important features of TensorFlow?

Following are the important features of TensorFlow:

● TensorFlow defines, optimizes and calculates mathematical expressions easily with the help of multi-dimensional arrays called tensors
● It includes a high scalable feature of computation with various data sets.
● TensorFlow includes a programming support of deep neural networks and machine learning techniques.
● TensorFlow uses GPU computing, automating management.
● It also includes a unique feature of optimization of same memory and the data used.


3) What is Tensor Data Structure in TensorFlow?

Tensors are used as the basic data structures in TensorFlow language. Tensors represent the connecting edges in any flow diagram called the Data Flow Graph. Tensors are defined as multidimensional array or list.


4) How we can identify Tensors in TensorFlow?

Following parameters can be used to identify Tensors:

Rank - Unit of dimensional described within tensor is called rank. Rank identifies the number of dimensions of the tensor.
Shape - The number of rows and columns together define the shape of Tensor.
Type - Type describes the data type assigned to Tensor's elements.


5) What are the various dimensions of TensorFlow?

TensorFlow includes various dimensions. Following are the dimensions:

One dimensional Tensor - it is an array structure which includes values of the same data type. Below is the sample snippet:

>>> import numpy as np
>>> tensor_1d_arr = np.array([1.4, 1, 54.0, 2.29])
>>> print tensor_1d_arr

Two dimensional Tensors - Sequence of arrays are used for creating two dimensional tensors. Below is the sample snippet:

>>> import numpy as np
>>> tensor_2d_arr = np.array([(1,2,3,4),(4,5,6,7)])
>>> print tensor_2d_arr


6) Which function converts a numpy array to tensor in TensorFlow?

Following function converts a numpy array to tensor in TensorFlow:
tf.convert_to_tensor(tensor1d, dtype = tf.float64)


7) In Tensorflow which function can normalize the data?

Tensorflow has built in function that can normalize the data before feeding into the algorithm: batch_norm_with_global_normalization()


8) Why is batch normalization needed in Tensorflow?

Batch normalization is useful as it normalizes (adjusts) all the inputs before sending it to the subsequent layer.


9) What is Tensorflow Estimator?

Tensorflow Estimator is a high-level API that reduces the code writing when training a TensorFlow model. Estimators are very flexible, allowing you to override the default behavior if you have specific requirements for your model.


10) What is ROC AUC Score in Tensorflow?

In tensorflow ROC AUC Score measures the overall performance for a full range of threshold levels.

tflearn.objectives.roc_auc_score (y_pred, y_true)


 

Related links: