Home »
MCQs
Keras Multiple-Choice Questions (MCQs)
Keras is an open-source software library that provides a Python interface for artificial neural networks. Keras acts as an interface for the TensorFlow library.
Keras MCQs: This section contains multiple-choice questions and answers on the various topics of Keras. Practice these MCQs to test and enhance your skills on Keras.
List of Keras MCQs
1. Keras is a ____.
- Data science library
- Neural network library
- Data testing library
Answer: B) Neural network library
Explanation:
Keras is a neural network library.
Discuss this Question
2. Keras is written in which language?
- Spark
- Java
- C
- C++
- Python
Answer: E) Python
Explanation:
Keras is written in python language.
Discuss this Question
3. Who developed Keras?
- Pete Shinners
- Wes McKinney
- François Chollet
Answer: C) François Chollet
Explanation:
Keras was developed by François Chollet.
Discuss this Question
4. Does Keras support convolutional or recurrent neural networks?
- Yes, it supports both
- Yes, it only supports convolutional network
- Yes, it only supports recurrent neural network
- None
Answer: A) Yes, it supports both
Explanation:
Yes, Keras supports convolutional or recurrent neural networks both and it also supports their combination.
Discuss this Question
5. Does Keras handle low-level computations?
- Yes
- No
Answer: B) No
Explanation:
No, Keras cannot handle low-level computations.
Discuss this Question
6. How many backend engines does Keras consist of?
- 2
- 3
- 4
- 9
Answer: B) 3
Explanation:
Keras consist of three backend engines: Tensor flow, Theano, CNTK.
Discuss this Question
7. TensorFlow is a product of which company?
- Oracle
- Microsoft
- Google
- IBM
Answer: C) Google
Explanation:
TenserFlow is the product of Google.
Discuss this Question
8. Which of the following activities are performed by TensorFlow?
- Data automation
- Model tracking
- Model retraining
- Performance monitoring
- All of the above
Answer: E) All of the above
Explanation:
TensorFlow helps us to perform the following activities:
- Data automation
- Model tracking
- Model retraining
- Performance monitoring
Discuss this Question
9. TensorFlow can be only used with python?
- Yes
- No
- Except python every language
Answer: B) NO
Explanation:
TensorFlow can be used with wide variety of languages: Python, JavaScript, C++, and Java
Discuss this Question
10. Which kind of library Theano is?
- Machine learning
- Artificial intelligence
- Mathematical operation
- None of the above
- All of the above
Answer: C) Mathematical operation
Explanation:
Theano library performs mathematical operations on multi-dimensional arrays.
Discuss this Question
11. Does Keras support multiple platforms?
- Yes
- No
Answer: A) YES
Explanation:
Yes, Keras support multiple platforms.
Discuss this Question
12. To revert back to the current name of the backend, which of the following backend functions would you use in Keras?
- Backend()
- keras.backend.backend()
- Backend.keras()
Answer: B) keras.backend.backend()
Explanation:
keras.backend.backend() is used to revert to the current name of the backend.
Discuss this Question
13. tf.keras.backend.set_floatx(value) will return ____?
- Returns the default float type, as a string.
- Returns the default float type, as a float number.
- Returns the default float type, as an integer.
- Returns the default float and integer type, as a string.
Answer: A) Returns the default float type, as a string.
Explanation:
tf.keras.backend.set_floatx(value), will return the default float type, as a string.
Discuss this Question
14. Which backend function in Keras returns the default image data format convention?
- Format_image()
- Image_format_data()
- image_data_format()
- image_format()
Answer: C) image_data_format()
Explanation:
image_data_format function in Keras returns the default image data format convention.
Discuss this Question
15. What is the return value of the epsilon function?
- It returns the absolute factor
- It returns the fuzz factor
- It returns the factorization of all the numbers used in an expression
- It returns the floor division of an expression
Answer: B) It returns the fuzz factor
Explanation:
The epsilon function returns the fuzz factor.
Discuss this Question
16. How many arguments does the placeholder function take, in Keras?
- 2
- 4
- 5
- 6
Answer: C) 5
Explanation:
Placeholder function takes 5 arguments:
- shape
- Ndim
- dtype
- Sparse
- name
Discuss this Question
17. How many types of models does Keras provide?
- 2
- 3
- 4
- 5
Answer: A) 2
Explanation:
Keras provides two types of models: A sequential Model and an advanced Model.
Discuss this Question
18. The layers within the sequential models are known as ____?
- Sequential API
- Sequential Layer
- Sequential processes
Answer: A) Sequential API
Explanation:
The layers within the sequential models are known as sequential API.
Discuss this Question
19. Which of the following Keras models is known to be the simplest model and it constitutes a linear set of layers?
- Sequential Model
- Advanced Model
Answer: A) Sequential Model
Explanation:
Sequential Keras model is known to be the simplest model and it constitutes a linear set of layers.
Discuss this Question
20. Which of the following methods is used to add layers in a sequential model?
- Layers_add()
- Add_layers()
- Add()
- Layers()
Answer: C) Add()
Explanation:
Add() method is used to add layers in a sequential model.
Discuss this Question
21. How many parameters does the compilation process take in Keras?
- 3
- 5
- 9
- 6
Answer: A) 3
Explanation:
Three parameters that the compilation process takes in Keras: An optimizer, A loss function, and A list of metrics.
Discuss this Question
22. What is LSTM?
- Longitude short-term memory
- Long short-term memory
- Lengthy short-term memory
Answer: B) Long short-term memory
Explanation:
LSTM stands for Long short-term memory.
Discuss this Question
23. Why do we use LSTM?
- To learn sequential data
- To process sequential data
- To classify sequential data
- All of the above.
Answer: D) All of the above.
Explanation:
LSTM is used to learn, process, to classify sequential data.
Discuss this Question
24. Is Keras functional API and Keras sequential API the same?
- Yes
- No
Answer: B) NO
Explanation:
Keras functional API is more flexible than Keras sequential API.
Discuss this Question
25. Models with shared layers, multi-outputs, and directed acyclic graphs can be defined using the ____?
- Keras functional API
- Keras sequential API
Answer: A) Keras functional API
Explanation:
Models with shared layers, multi-outputs, and directed acyclic graphs can be defined using the Keras functional API.
Discuss this Question
26. Which of the following API arranges the Keras layers in sequential order?
- Keras functional API
- Keras sequential API
Answer: B) Keras sequential API
Explanation:
Keras Sequential API arranges the Keras layers in sequential order.
Discuss this Question
27. To implement a densely-connected network, which of the following model gives better results?
- Sequential model
- Advanced model
Answer: A) Sequential model
Explanation:
Sequential model results better to implement a densely-connected network.
Discuss this Question
28. The functional API can handle models with ____topology?
- Linear
- Non-linear
- Advanced model
Answer: A) Linear
Explanation:
The functional API can handle models with non-linear topology
Discuss this Question
29. Does Keras allow you to create your own layer?
- Yes
- No
Answer: A) YES
Explanation:
Yes, we can create layers in Keras, and also it provides us with predefined layers.
Discuss this Question
30. Which layer in Keras is a widely used layer for creating a deeply connected layer in the neural network?
- Flatten layer
- Dropout layer
- Dense layer
- Permute layer
Answer: C) Dense layer
Explanation:
Dense layer in Keras is widely used Keras layer for creating a deeply connected layer in the neural network.
Discuss this Question
31. Which of the following layers in Keras is used for flattening the input?
- Flatten layer
- Dropout layer
- Pooling layer
- Permute layer
Answer: A) Flatten layer
Explanation:
Flatten layer in Keras is used for flattening the input.
Discuss this Question
32. which Keras layer would you use if you want to reduce overfitting in neural network models?
- Pooling layer
- Dropout layer
- Permute layer
- Lambda layer
Answer: B) Dropout layer
Explanation:
We will use the Dropout layer if we want to reduce overfitting in neural network models.
Discuss this Question
33. Which of the following layers is capable of altering the shape of the input?
- Pooling layer
- Dropout layer
- Permute layer
- Reshape layer
Answer: D) Reshape layer
Explanation:
Reshape layer is capable of altering the shape of the input.
Discuss this Question
34. Which Keras layer would you use if you want to repeat the input a fixed number of times?
- Pooling layer
- Repeatvector layer
- Permute layer
- Lambda layer
Answer: B) Repeatvector layer
Explanation:
RepeatVector layer will repeat the input a fixed number of times.
Discuss this Question
35. In Keras, "dense" refers to a ____ layer.
- Single
- Multiple
- Linear
- Non-linear
Answer: A) Single
Explanation:
In Keras, "dense" refers to a single layer.
Discuss this Question
36. In Keras, "sequential" refers to a ____?
- Single layer
- Multiple layers
- Entire model
Answer: C) Entire model
Explanation:
In Keras, "sequential" refers to an entire model.
Discuss this Question
37. What does sequential.pop() method do?
- It helps in the removal of the first layer from the model.
- It helps in the removal of the last layer from the model.
- It helps in the removal of any layer from the model.
Answer: B) 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.
Discuss this Question
38. When sequential.pop() method raises a TypeError?
- When there is no layer within the model
- When there is the single layer within the model
- When there are more than 10 layers within the model
Answer: B) 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.
Discuss this Question
39. Which of the following layers is used to wrap up an arbitrary expression?
- Pooling layer
- Repeatvector layer
- Permute layer
- Lambda layer
Answer: D) Lambda layer
Explanation:
The lambda layer is used to wrap up an arbitrary expression.
Discuss this Question
40. Which layer acts as a base class for the recurrent layers?
- Pooling layer
- Repeatvector layer
- Permute layer
- Lambda layer
- RNN layer
Answer: E) RNN layer
Explanation:
RNN layers act as a base class for the recurrent layers.
Discuss this Question
41. Which layer in Keras supports masking?
- Pooling layer
- Repeatvector layer
- Permute layer
- Embedding layer
- RNN layer
Answer: D) Embedding layer
Explanation:
Embedding layers in Keras support masking.
Discuss this Question
42. Which of the following is a fully connected layer whose output is sent back to the input?
- Pooling layer
- SimpleRNN layer
- Embedding layer
- RNN layer
Answer: B) SimpleRNN layer
Explanation:
SimpleRNN layer is a fully connected layer whose output is sent back to the input.
Discuss this Question
43. What is GRU in Keras?
- Granted Recurrent unit
- Gated Recurrent unit
- Great recurrent unit
Answer: B) Gated Recurrent unit
Explanation:
GRU stands for the grated recurrent unit.
Discuss this Question
44. Who introduced LSTM?
- Pete Shinners
- Wes McKinney
- François Chollet
- Hochreiter
Answer: D) Hochreiter
Explanation:
LSTM was introduced by Hochreiter.
Discuss this Question
45. Does Keras run on a GPU?
- Yes
- No
Answer: A) YES
Explanation:
Keras run smoothly on GPU and CPU.
Discuss this Question
46. Which of the following companies uses Keras?
- Netflix
- Uber
- Yelp
- All of the above
Answer: D) All of the above
Explanation:
Companies like Netflix, Uber, and Yelp use Keras.
Discuss this Question
47. Which of the following functions offers you the list of all the input tensors in a model?
- Models.inputs()
- Input. Models()
- Inputs()
Answer: A) Models.inputs()
Explanation:
Model.inputs() function offers you the list of all the input tensors in a model.
Discuss this Question
48. To train your model in Keras, which of the following methods would you use?
- Predict()
- Model()
- Fit()
Answer: C) Fit()
Explanation:
The fit method is used to train the model in Keras.
Discuss this Question
49. To predict your model, which of the following methods would you use?
- Predict()
- Model()
- Fit()
Answer: A) Predict()
Explanation:
Predict method is used to predict the model.
Discuss this Question
50. Which functions in Keras help you to find faults or deviations in the learning process?
- Keras optimizer function
- Keras metrics
- Keras loss function
Answer: C) Keras loss function
Explanation:
Keras loss function in Keras helps you to find faults or deviations in the learning process.
Discuss this Question
51. Which of the following permits you to evaluate the performance of your model?
- Keras optimizer function
- Keras metrics
- Keras loss function
Answer: B) Keras metrics
Explanation:
Keras metrics permit you to evaluate the performance of your model.
Discuss this Question
52. In which of the following layers, input is transformed into a standardized form?
- Normalization Layer
- Pooling Layer
- Noise Layer
- Recurrent Layer
Answer: A) Normalization Layer
Explanation:
In normalization, layer input is transformed into a standardized form.
Discuss this Question
53. In how many ways can you include your customized layer in Keras?
- 2
- 3
- 4
- 5
Answer: A) 2
Explanation:
There are two ways in which you can customize the layer:Custom Class Layer, and Lambda Layer.
Discuss this Question
54. Which of the following backend functions in Keras offers you to enter the Keras graph?
- Eager()
- Backend()
- Shape()
- Symbolic()
Answer: D) Symbolic()
Explanation:
Symbolic() backend function in Keras offers you to enter the Keras graph.
Discuss this Question
55. Which of the following principles does Keras follow to perform deep learning efficiently?
- Modularity
- User-friendliness
- Extensibility
- All of the above
Answer: D) All of the above
Explanation:
Modularity, User-friendliness, and Extensibility principle does Keras follow to perform deep learning efficiently.
Discuss this Question
56. ____ are the basic units of Convolutional Neural Networks?
- Neurons
- Pooling
- ReLU
Answer: A) Neurons
Explanation:
Neurons are the basic units of Convolutional Neural Networks.
Discuss this Question
57. How many layers does CNN consist of?
- 2
- 3
- 4
- 5
Answer: B) 3
Explanation:
CNN consists of 3 layers: a pooling layer, and a fully connected layer, a convolutional layer.
Discuss this Question
58. What do you mean by OpenCV?
- Open source common vision
- Open-source common visualization
- Open-source computer vision
Answer: C) Open-source computer vision
Explanation:
OpenCV is known as Open-source computer vision.
Discuss this Question
59. OpenCV is useful for ____?
- Machine learning
- Computer vision
- Both
- Only A
- Only B
Answer: C) Both
Explanation:
OpenCV is useful for Machine learning and Computer vision.
Discuss this Question
60. Is OpenCV a platform-independent library?
- Yes
- No
Answer: A) YES
Explanation:
OpenCV is platform-independent. It supports a variety of platforms.
Discuss this Question
61. Which is more efficient, Keras or OpenCV?
- OpenCV
- Keras
Answer: B) Keras
Explanation:
Keras is more efficient than OpenCV.
Discuss this Question
62. Which is slower, Keras or TensorFlow?
- Keras
- TensorFlow
Answer: A) Keras
Explanation:
Keras is slower than TensorFlow.
Discuss this Question
63. Which of the following has simpler architecture?
- Keras
- TensorFlow
Answer: A) Keras
Explanation:
Keras has simpler architecture than TensorFlow.
Discuss this Question
64. Is Keras capable of handling complex datasets?
- Yes
- No
Answer: B) NO
Explanation:
Keras is good with smaller datasets but not with complex datasets.
Discuss this Question
65. Is TensorFlow capable of handling complex datasets?
- Yes
- No
Answer: A) YES
Explanation:
Yes, TensorFlow is good with smaller datasets as well as with complex datasets.
Discuss this Question