Google News
logo
Keras - Quiz(MCQ)

Keras : Keras is a deep learning API written in Python, running on top of the machine learning platform TensorFlow. It was developed with a focus on enabling fast experimentation.

Keras supported multiple backends, including TensorFlow, Microsoft Cognitive Toolkit, Theano, and PlaidML.

Keras provides industry-strength performance and scalability: it is used by organizations and companies including NASA, YouTube, or Waymo.

A)
C
B)
C++
C)
Python
D)
Java

Correct Answer :   Python


Explanation : Keras is written in python language.

A)
Sam Gross
B)
Adam Paszke
C)
Michael Berthold
D)
François Chollet

Correct Answer :   François Chollet


Explanation : François Chollet (Born 20 October 1989) is a French software engineer and artificial intelligence researcher currently working at Google.

François Chollet is the creator of the Keras deep-learning library, released in 2015, and a main contributor to the TensorFlow machine learning framework.

A)
27 March 2017
B)
27 March 2015
C)
27 March 2011
D)
27 March 2007

Correct Answer :   27 March 2015


Explanation : François Chollet he is French software engineer and artificial intelligence researcher, Creator of the Keras deep-learning library, released in 27 March 2015, and a main contributor to the TensorFlow machine learning framework.

A)
model.layers
B)
model.inputs
C)
model.outputs
D)
model.get_weights

Correct Answer :   model.layers


Explanation : model.layers : Returns all the layers of the model as list.

A)
Keras Time
B)
Keras Layer
C)
Keras Model
D)
Keras Module

Correct Answer :   Keras Layer


Explanation : A Keras layer requires shape of the input (input_shape) to understand the structure of the input data, initializer to set the weight for each input and finally activators to transform the output to make it non-linear.

A)
Keras
B)
PyTorch
C)
Scikit-Learn
D)
TensorFlow

Correct Answer :   Scikit-Learn


Explanation :  Keras, TensorFlow, and PyTorch are all popular deep learning frameworks, whereas Scikit-Learn is a machine learning library.

A)
Keras is a standalone library
B)
Keras is built on top of PyTorch
C)
Keras is built on top of Scikit-Learn
D)
Keras is built on top of TensorFlow

Correct Answer :   Keras is built on top of TensorFlow

A)
Neural network library
B)
Data science library
C)
Data testing library
D)
All of the above

Correct Answer :   Neural network library


Explanation : Keras is a Neural Network Library.

A)
Yes, it supports both
B)
Yes, it only supports convolutional network
C)
Yes, it only supports recurrent neural network
D)
None of the above

Correct Answer :   Yes, it supports both


Explanation : Yes, Keras supports convolutional or recurrent neural networks both and it also supports their combination.

A)
Yes
B)
No
C)
Can Not Say
D)
None of the above

Correct Answer :   No


Explanation : No, Keras cannot handle low-level computations.

A)
Yes
B)
No
C)
Can Not Say
D)
None of the above

Correct Answer :   Yes


Explanation : Yes, TensorFlow is good with smaller datasets as well as with complex datasets.

A)
Yes
B)
No
C)
Can Not Say
D)
None of the above

Correct Answer :   No


Explanation : Keras is good with smaller datasets but not with complex datasets.

A)
Keras
B)
TensorFlow
C)
Both (A) and (B)
D)
None of the above

Correct Answer :   Keras


Explanation : Keras is slower than TensorFlow.

A)
keras.initializers.Ones()
B)
keras.initializers.Zeros()
C)
keras.initializers.Initializer()
D)
All of the above

Correct Answer :   All of the above


Explanation : All of the above are correct initializers in keras.

A)
PyBrain
B)
PyTorch
C)
Keras
D)
Theano

Correct Answer :   Keras


Explanation : Keras is a high level API built on TensorFlow (and can be used on top of Theano too). It is more user-friendly and easy to use as compared to TensofrFlow.

A)
Recurrent model
B)
Decision tree model
C)
Sequential model
D)
Convolutional model

Correct Answer :   Decision tree model


Explanation : Keras is primarily used for building deep learning models, such as sequential, convolutional, and recurrent models.

A)
SVM layer
B)
Dense layer
C)
Recurrent layer
D)
Convolutional layer

Correct Answer :   SVM layer


Explanation : Keras does not have an SVM layer. Instead, you can use a dense layer with a linear activation function to implement an SVM.

A)
1
B)
2
C)
3
D)
4

Correct Answer :   3


Explanation : Keras consist of three backend engines: Tensor flow, Theano, CNTK.

A)
Google
B)
IBM
C)
Oracle
D)
Microsoft

Correct Answer :   Google


Explanation : TenserFlow is the product of Google.

A)
Model tracking
B)
Model retraining
C)
Data automation
D)
All of the above

Correct Answer :   All of the above


Explanation : TensorFlow helps us to perform the following activities :

* Model tracking
* Model retraining
* Data automation
* Performance monitoring

A)
Keras
B)
OpenCV
C)
Both (A) and (B)
D)
None of the above

Correct Answer :   Keras


Explanation : Keras is more efficient than OpenCV.

A)
Yes
B)
No
C)
Can Not Say
D)
None of the above

Correct Answer :   Yes


Explanation : OpenCV is platform-independent. It supports a variety of platforms.

A)
Computer vision
B)
Machine learning
C)
Both (A) and (B)
D)
None of the above

Correct Answer :   Both (A) and (B)


Explanation : OpenCV is useful for Machine learning and Computer vision.

A)
Open source common vision
B)
Open-source computer vision
C)
Open-source common visualization
D)
None of the above

Correct Answer :   Open-source computer vision


Explanation : OpenCV is known as Open-source computer vision.

A)
import keras
B)
from keras import *
C)
import tensorflow.keras
D)
All of the above

Correct Answer :   import tensorflow.keras


Explanation : While “import keras” is also a valid syntax, it is recommended to use “import tensorflow.keras” because Keras is now part of the TensorFlow library.

A)
model.add(DenseLayer(units=10, activation=’relu’))
B)
model.add(DenseModel(units=10, activation=’relu’))
C)
model.add(DenseNetwork(units=10, activation=’relu’))
D)
model.add(Dense(units=10, activation=’relu’))

Correct Answer :   model.add(Dense(units=10, activation=’relu’))


Explanation : The correct syntax for adding a dense layer to a Keras model is “model.add(Dense(units=10, activation=’relu’))”.

A)
model = Sequential()
B)
model = SequentialLayer()
C)
model = SequentialModel()
D)
model = SequentialNetwork()

Correct Answer :   model = Sequential()


Explanation : The correct syntax for creating a sequential model in Keras is “model = Sequential()”.

A)
Yes
B)
No
C)
Can Not Say
D)
None of the above

Correct Answer :   No


Explanation : TensorFlow can be used with wide variety of languages: Python, JavaScript, C++, and Java

A)
Machine learning
B)
Artificial intelligence
C)
Mathematical operation
D)
None of the above

Correct Answer :   Mathematical operation


Explanation : Theano library performs mathematical operations on multi-dimensional arrays.

A)
ReLU
B)
Pooling
C)
Neurons
D)
None of the above

Correct Answer :   Neurons


Explanation : Neurons are the basic units of Convolutional Neural Networks.

A)
2
B)
3
C)
4
D)
5

Correct Answer :   3


Explanation : CNN consists of 3 layers: a pooling layer, and a fully connected layer, a convolutional layer.

A)
Symbolic()
B)
Shape()
C)
Eager()
D)
Backend()

Correct Answer :   Symbolic()


Explanation : Symbolic() backend function in Keras offers you to enter the Keras graph.

A)
Modularity
B)
Extensibility
C)
User-friendliness
D)
All of the above

Correct Answer :   All of the above


Explanation : Modularity, User-friendliness, and Extensibility principle does Keras follow to perform deep learning efficiently.

A)
2
B)
3
C)
4
D)
5

Correct Answer :   2


Explanation : There are two ways in which you can customize the layer:Custom Class Layer, and Lambda Layer.

A)
Tanh
B)
ReLU
C)
Linear
D)
Sigmoid

Correct Answer :   Linear


Explanation : Linear activation is not a separate activation function in Keras. Instead, it is the default activation function for the last layer of a regression model.

A)
BinaryCross entropy
B)
CategoricalCrossentropy
C)
MeanSquaredError
D)
SparseCategoricalCrossentropy

Correct Answer :   CategoricalCrossentropy


Explanation : The CategoricalCrossentropy loss function is commonly used for multi-class classification problems in Keras.

A)
MeanSquaredError
B)
BinaryCrossentropy
C)
CategoricalCrossentropy
D)
SparseCategoricalCrossentropy

Correct Answer :   BinaryCrossentropy


Explanation : The BinaryCrossentropy loss function is commonly used for binary classification problems in Keras.

A)
Returns the default float type, as a string.
B)
Returns the default float type, as an integer.
C)
Returns the default float type, as a float number.
D)
Returns the default float and integer type, as a string.

Correct Answer :   Returns the default float type, as a string.


Explanation : tf.keras.backend.set_floatx(value), will return the default float type, as a string.

A)
Backend()
B)
Backend.keras()
C)
keras.backend.backend()
D)
All of the above

Correct Answer :   keras.backend.backend()


Explanation : keras.backend.backend() is used to revert to the current name of the backend.

A)
image_format()
B)
Format_image()
C)
Image_format_data()
D)
image_data_format()

Correct Answer :   image_data_format()


Explanation : image_data_format function in Keras returns the default image data format convention.

A)
SGD
B)
Adam
C)
RProp
D)
RandomOptimizer

Correct Answer :   RandomOptimizer


Explanation : RandomOptimizer is not a built-in optimizer in Keras.

A)
model.compile(Adam, categorical_crossentropy, [‘accuracy’])
B)
model.optimizer(‘adam’).loss(‘categorical_crossentropy’).metrics([‘accuracy’]).compile()
C)
model.compile(optimizer=’adam’, loss=’categorical_crossentropy’, metrics=[‘accuracy’])
D)
compile.model(optimizer=’adam’, loss=’categorical_crossentropy’, metrics=[‘accuracy’])

Correct Answer :   model.compile(optimizer=’adam’, loss=’categorical_crossentropy’, metrics=[‘accuracy’])


Explanation : The correct syntax for compiling a Keras model is “model.compile(optimizer=’adam’, loss=’categorical_crossentropy’, metrics=[‘accuracy’])”.

A)
model.eval(X_test, y_test)
B)
model.evaluate(X_test, y_test)
C)
model.eval_data(X_test, y_test)
D)
model.evaluate_on_data(X_test, y_test)

Correct Answer :   model.evaluate(X_test, y_test)


Explanation : The correct syntax for evaluating a Keras model is “model.evaluate(X_test, y_test)”.

A)
model.fit(X_train, y_train, epochs=10, batch_size=32)
B)
model.train(X_train, y_train, epochs=10, batch_size=32)
C)
model.fit_data(X_train, y_train, epochs=10, batch_size=32)
D)
model.train_on_data(X_train, y_train, epochs=10, batch_size=32)

Correct Answer :   model.fit(X_train, y_train, epochs=10, batch_size=32)


Explanation : The correct syntax for training a Keras model is “model.fit(X_train, y_train, epochs=10, batch_size=32)”.

A)
3
B)
4
C)
5
D)
6

Correct Answer :   5


Explanation : Placeholder function takes 5 arguments :

* shape
* Ndim
* dtype
* Sparse
* name

A)
2
B)
3
C)
4
D)
5

Correct Answer :   2


Explanation : Keras provides two types of models: A sequential Model and an advanced Model.

A)
add()
B)
fit()
C)
predict()
D)
backward()

Correct Answer :   backward()


Explanation : The Sequential class does not have a backward() method. Instead, it uses automatic differentiation to compute gradients during training.

A)
It returns the absolute factor
B)
It returns the fuzz factor
C)
It returns the floor division of an expression
D)
It returns the factorization of all the numbers used in an expression

Correct Answer :   It returns the fuzz factor


Explanation : The epsilon function returns the fuzz factor.

A)
predict.model(X_new)
B)
model.predict(X_new)
C)
model.predict_on_data(X_new)
D)
model.make_predictions(X_new)

Correct Answer :   model.predict(X_new)


Explanation : The correct syntax for making predictions with a Keras model is “model.predict(X_new)”.

A)
Keras metrics
B)
Keras loss function
C)
Keras optimizer function
D)
None of the above

Correct Answer :   Keras metrics


Explanation : Keras metrics permit you to evaluate the performance of your model.

A)
Keras metrics
B)
Keras loss function
C)
Keras optimizer function
D)
None of the above

Correct Answer :   Keras loss function


Explanation : Keras loss function in Keras helps you to find faults or deviations in the learning process.

A)
Noise Layer
B)
Pooling Layer
C)
Normalization Layer
D)
Recurrent Layer

Correct Answer :   Normalization Layer


Explanation : In normalization, layer input is transformed into a standardized form.

A)
Sequential Model
B)
Advanced Model
C)
Both (A) and (B)
D)
None of the above

Correct Answer :   Sequential Model


Explanation : Sequential Keras model is known to be the simplest model and it constitutes a linear set of layers.

A)
Sequential API
B)
Sequential Layer
C)
Sequential processes
D)
None of the above

Correct Answer :   Sequential API


Explanation : The layers within the sequential models are known as sequential API.

A)
Layers()
B)
Add()
C)
Add_layers()
D)
Layers_add()

Correct Answer :   Add()


Explanation : Add() method is used to add layers in a sequential model.

A)
Removing layers
B)
Increasing the learning rate
C)
Decreasing the number of neurons in each layer
D)
Increasing the number of neurons in each layer

Correct Answer :   Increasing the number of neurons in each layer


Explanation : Increasing the number of neurons in each layer can increase the capacity of the model, allowing it to learn more complex patterns in the data.

A)
Adding more layers
B)
Adding more training data
C)
Increasing the batch size
D)
Decreasing the learning rate

Correct Answer :   Increasing the batch size


Explanation : Increasing the batch size can speed up training by allowing the model to process more examples at once, reducing the number of updates needed per epoch.

A)
Adding more layers
B)
Adding dropout layers
C)
Decreasing the batch size
D)
Increasing the learning rate

Correct Answer :   Adding dropout layers


Explanation : Dropout layers randomly drop out some of the neurons during training, which can help prevent overfitting.

A)
Long short-term memory
B)
Lengthy short-term memory
C)
Longitude short-term memory
D)
None of the above

Correct Answer :   Long short-term memory


Explanation : LSTM stands for Long short-term memory.

A)
To learn sequential data
B)
To classify sequential data
C)
To process sequential data
D)
All of the above

Correct Answer :   All of the above


Explanation : LSTM is used to learn, process, to classify sequential data.

A)
3
B)
4
C)
5
D)
6

Correct Answer :   3


Explanation : Three parameters that the compilation process takes in Keras: An optimizer, A loss function, and A list of metrics.

A)
LSTM
B)
Dense
C)
Conv2D
D)
Dropout

Correct Answer :   Conv2D


Explanation : The Conv2D layer is commonly used for image classification tasks in Keras.

A)
LSTM
B)
Dense
C)
Conv2D
D)
Dropout

Correct Answer :   LSTM


Explanation : The LSTM layer is commonly used for sequence prediction tasks in Keras.

A)
LSTM
B)
Dense
C)
Conv2D
D)
Embedding

Correct Answer :   Embedding


Explanation : The Embedding layer is commonly used for text classification tasks in Keras.

A)
LSTM
B)
Dropout
C)
Conv2D
D)
MaxPooling2D

Correct Answer :   Dropout


Explanation : The Dropout layer is commonly used for regularization in Keras, by randomly dropping out some of the neurons during training.

A)
Inputs()
B)
Input. Models()
C)
Models.inputs()
D)
None of the above

Correct Answer :   Models.inputs()


Explanation : Model.inputs() function offers you the list of all the input tensors in a model.

A)
Fit()
B)
Predict()
C)
Model()
D)
None of the above

Correct Answer :   Predict()


Explanation : Predict method is used to predict the model.

A)
Fit()
B)
Model()
C)
Predict()
D)
None of the above

Correct Answer :   Fit()


Explanation : The fit method is used to train the model in Keras.

A)
Yes
B)
No
C)
Can Not Say
D)
None of the above

Correct Answer :   Yes


Explanation : Keras run smoothly on GPU and CPU.

A)
Yelp
B)
Uber
C)
Netflix
D)
All of the above

Correct Answer :   All of the above


Explanation : Companies like Netflix, Uber, and Yelp use Keras.

A)
Dropout layer
B)
Flatten layer
C)
Permute layer
D)
Dense layer

Correct Answer :   Dense layer


Explanation : Dense layer in Keras is widely used Keras layer for creating a deeply connected layer in the neural network.

A)
Binary Crossentropy
B)
Gradient Descent
C)
Categorical Crossentropy
D)
Mean Squared Error (MSE)

Correct Answer :   Gradient Descent


Explanation : Gradient Descent is an optimization algorithm, not a loss function. Mean Squared Error, Binary Crossentropy, and Categorical Crossentropy are all common loss functions used in Keras.

A)
Keras functional API
B)
Keras sequential API
C)
Both (A) and (B)
D)
None of the above

Correct Answer :   Keras functional API


Explanation : Models with shared layers, multi-outputs, and directed acyclic graphs can be defined using the Keras functional API.

A)
Keras functional API
B)
Keras sequential API
C)
Both (A) and (B)
D)
None of the above

Correct Answer :   Keras sequential API


Explanation : Keras Sequential API arranges the Keras layers in sequential order.

A)
Great recurrent unit
B)
Granted Recurrent unit
C)
Gated Recurrent unit
D)
None of the above

Correct Answer :   Gated Recurrent unit


Explanation : GRU stands for the grated recurrent unit.

A)
Pete Shinners
B)
Wes McKinney
C)
François Chollet
D)
Hochreiter

Correct Answer :   Hochreiter


Explanation : LSTM was introduced by Hochreiter.

A)
Pooling layer
B)
Dropout layer
C)
Permute layer
D)
Reshape layer

Correct Answer :   Reshape layer


Explanation : Reshape layer is capable of altering the shape of the input.

A)
It helps in the removal of the last layer from the model.
B)
It helps in the removal of any layer from the model.
C)
It helps in the removal of the first layer from the model.
D)
All of the above

Correct Answer :   It helps in the removal of the last layer from the model.


Explanation : Sequential.pop() functions help in the removal of the last layer from the model.

A)
When there is no layer within the model
B)
When there is the single layer within the model
C)
When there are more than 10 layers within the model
D)
None of the above

Correct Answer :   When there is the single layer within the model


Explanation : sequential.pop() method raises a TypeError When there is a single layer within the model.

A)
RNN layer
B)
Pooling layer
C)
SimpleRNN layer
D)
Embedding layer

Correct Answer :   SimpleRNN layer


Explanation : SimpleRNN layer is a fully connected layer whose output is sent back to the input.

Advertisement