September 26, 2018

Sreekanth B

TensorFlow Freshers Basic Interview Questions and Answers

How you place operations on a particular device?

You should create the operations within a with tf.device(name): context to place them on a particular device.

What is the simplest way to send data to TensorBoard?

First of all, you should add summary operations to your graph, and then log them in a log directory. Then, TensorBoard  should be started using:

python tensorflow/tensorboard/ –logdir=path/to/log-directory

What exactly do you know about Bias-Variance decomposition?

It generally uses to decompose problems such as errors that occur during learning in different algorithms. Bias keeps reducing if the data is to be made complex. Trading off the Variance and Bias are very essential to get results that are totally free from errors.

How is k-means clustering different from KNN?

It is an unsupervised learning algorithm used for clustering. On the other hand, the KNN is a structured clustering algorithm. They both share some similarities but users need to label the data in the KNN which is not required in k-means clustering.

What exactly Neural Networks are? What are the types of same you are familiar with?

Basically a connection of processing elements which can very large or very small depending on the application, it deployed for. These elements called neurons and generally, two types of networks can be seen in this category. They are Artificial Neural Networks and Biological Neural Networks. The use of artificial neural networks is more common and generally, they are considered for creating machines which are equally powerful to human brains.
TensorFlow Freshers Basic Interview Questions and Answers
TensorFlow Freshers Basic Interview Questions and Answers

What are placeholders in TensorFlow?

It is an assurity to the tensorflow that an external value will be provided later.

What is tf.contrib.learn?

tf.contrib.learn is a TensorFlow library for simplifying the working of machine learning, and it includes:

managing data sets
managing feeding

What is input pipeline optimization?

The process flow of your model includes the loading of the image from the disk, converting it to a tensor followed by manipulating the tensor by cropping, padding and then making a batch. The process flow described above is called input pipeline.

What is the MNIST dataset?

It is a dataset containing information of handwritten digits.

What are the different dashboards in TensorFlow?

Below mentioned are different types of dashboards in TensorFlow:

a. Histogram

b. Text

c. Distribution

d. Image

e. Audio

f. Graph

g. Embedding.

How do you import Tensorflow?

import TensorFlow as tf

What are word embeddings used for and can they be used in TensorFlow?

Word embeddings usually use in Natural Language Processing as a representation of words and they can use in TensorFlow where it also call as word2vec.

Follow this link to learn more about word embedding.

Which client languages are supported in TensorFlow?

TensorFlow supports multiple client languages, the best language being Python. There are experimental interfaces that are available for C++ Java and Go. Bindings for various other languages (such as C#, Julia, Ruby and Scala) are created and supported by the opensource community.

Do Sessions have a lifetime? What about intermediate tensors?

Resources like as tf.Variable, tf.QueueBase, and tf.ReaderBase; own by a session and may use a significant amount of memory which are released when the session is terminated with tf.Session.close.

What’s the deal with feeding and placeholders?

Feeding is a phenomenon that allows you to substitute different values for one or more Tensors at the runtime. The feed_dict argument is used to map tf.Tensorobjects to numpy arrays for further executions.

Why does hang when using a reader or a queue?

The tf.ReaderBase and tf.QueueBase classes provide special operations that become blocked since the input isn’t available. They allow building clear input pipelines, by making the computation a little more complicated.

What is the lifetime of a variable?

A variable is created when you first run the tf.Variable.initializer operation for that variable in a session. It gets destroyed when that tf.Session.close.

How do variables behave when they are concurrently accessed?

Variables allow concurrency in read/write ops. The variable value may change when the concurrently updates. By default, there is no mutex (mutual exclusion).

Name the two models used in word embeddings?

The Continuous Bag of Words (CBOW) model and the skip-gram model

Write a code to start a simple session for the training?

with tf.Session() as sess:

Explain the following example.

for the epoch in      range(training_epochs):
       for (x, y) in zip(train_X, train_Y):
 , feed_dict={X: x, Y: y})
Here, the initializer is run and all the training data fit by running a loop for all the epochs

List the two configurations needed to optimize CPU performance?

Intra_op_parallelism and iner_op_parallelism

How do you define a cluster in TensorFlow?

cluster = tf.train.ClusterSpec({“local”: [“localhost:2222”, “localhost:2223”]})

How do you see the charts and graphs for your model and what is the URL?

You can view the charts and graphs using TensorBoard by browsing to https://localhost:6006 in your browser.

What is the confusion matrix?

A confusing matrix comprising of discrete values where each column contains a set of samples that estimated to be a keyword in your training model.

Describe the steps to configure a wide and deep model in TensorFlow?

Wide model features: Choosing the base columns and crossed columns.
Deep model features: Choosing the continuous columns, the dimension for each categorical column, and hidden layer sizes.
Combining these into a single model with DNNLinearCombinedClassifier

Write a code to display the evaluated values while training your model in TensorFlow.

print('Results at epoch', (n + 1) * FLAGS.epochs_per_eval)
 print('-' * 30)
 for key in sorted(results):
   print('%s: %s' % (key, results[key]))

What are the imports needed for visualizing the Mandelbrot set in TensorFlow?

import PIL.Image

from io import BytesIO

from IPython.display import Image, display

How do you report a vulnerability in TensorFlow?

The reports about any security issues can send directly to The report to this email delivered to the security team at TensorFlow. The emails then acknowledged within 24 hours and detailed response is provided within a week along with the next steps.

What do you use for deploying a lite model file in TensorFlow?

Java API: A wrapper around C++ API on Android.
C++ API: It loads the TensorFlow Lite model and calls the interpreter.
Interpreter: It can use to execute the model. It uses selective kernel loading which is a unique feature of TensorFlow Lite.
You can also implement custom kernels using the C++ API.

Subscribe to get more Posts :