
- What is Keras?
A) A neural network library
B) A programming language
C) A machine learning algorithm
D) A data visualization tool
Answer: A) A neural network library
- What does “Keras” mean in Greek?
A) Machine learning
B) Deep learning
C) Intelligence
D) Shell
Answer: D) Shell
- What backend engines does Keras support?
A) Only TensorFlow
B) Only PyTorch
C) Both TensorFlow and PyTorch
D) Neither TensorFlow nor PyTorch
Answer: C) Both TensorFlow and PyTorch
- Which programming language is used to write Keras?
A) Python
B) C++
C) Java
D) Ruby
Answer: A) Python
- What is Keras’ main advantage over other neural network libraries?
A) It is faster than other libraries
B) It is easier to use than other libraries
C) It is more accurate than other libraries
D) It is cheaper than other libraries
Answer: B) It is easier to use than other libraries
- Which of the following is a Keras layer type?
A) Convolutional
B) Recurrent
C) Dense
D) All of the above
Answer: D) All of the above
- What is a sequential model in Keras?
A) A model with a single input and single output
B) A model with multiple inputs and single output
C) A model with single input and multiple outputs
D) A model with multiple inputs and multiple outputs
Answer: A) A model with a single input and single output
- What is the role of an activation function in Keras?
A) To add non-linearity to the model
B) To reduce overfitting
C) To increase model accuracy
D) To speed up model training
Answer: A) To add non-linearity to the model
- Which of the following is not an optimization function in Keras?
A) Adam
B) Gradient Descent
C) Adagrad
D) All of the above are optimization functions in Keras
Answer: B) Gradient Descent
- What is the role of regularization in Keras?
A) To reduce overfitting
B) To increase model accuracy
C) To speed up model training
D) To add non-linearity to the model
Answer: A) To reduce overfitting
- Which of the following is a pre-trained model in Keras?
A) VGG16
B) AlexNet
C) ResNet50
D) All of the above
Answer: D) All of the above
- Which of the following is not a data preprocessing technique in Keras?
A) Normalization
B) Standardization
C) One-hot encoding
D) Ridge regression
Answer: D) Ridge regression
- How does data augmentation improve a Keras model?
A) By adding more training data
B) By reducing the size of the model
C) By increasing the learning rate
D) By reducing the number of epochs
Answer: A) By adding more training data
- What is the purpose of a callback function in Keras?
A) To change the loss function during training
B) To save the model during training
C) To change the optimizer during training
D) To evaluate the model on a validation set during training
Answer: B) To save the model during training
- Which Keras API allows for more flexibility in model creation?
A) Sequential API
B) Functional API
C) Object-oriented API
D) None of the above
Answer: B) Functional API
- Which of the following is not a Keras layer type for text data?
A) Embedding
B) Convolutional
C) Recurrent
D) Dense
Answer: B) Convolutional
- Which Keras layer type is commonly used for image classification?
A) Embedding
B) Convolutional
C) Recurrent
D) Dense
Answer: B) Convolutional
- What is the purpose of the Flatten layer in Keras?
A) To increase model accuracy
B) To reduce model size
C) To reshape input data
D) To add non-linearity to the model
Answer: C) To reshape input data
- What is early stopping in Keras?
A) A callback function that saves the model during training
B) A callback function that stops training when model accuracy stops improving
C) An optimizer function that reduces overfitting
D) A data preprocessing technique that normalizes input data
Answer: B) A callback function that stops training when model accuracy stops improving
- Which of the following is not a Keras loss function?
A) Mean Square Error
B) Categorical Crossentropy
C) Binary Crossentropy
D) Gaussian Mixture Model
Answer: D) Gaussian Mixture Model
- What is transfer learning in Keras?
A) Using pre-trained models to train a new model on a different task
B) Transferring data from one machine to another
C) Transferring weights from one layer to another
D) Using pre-trained models to train on the same task
Answer: A) Using pre-trained models to train a new model on a different task
- Which of the following is not a Keras data generator?
A) ImageDataGenerator
B) TextDataGenerator
C) SequenceDataGenerator
D) None of the above
Answer: B) TextDataGenerator
- Which of the following is not a Keras evaluation metric?
A) Accuracy
B) Precision
C) Recall
D) None of the above
Answer: D) None of the above
- Which of the following is a Keras tool for model visualization?
A) TensorFlow
B) PyTorch
C) TensorBoard
D) None of the above
Answer: C) TensorBoard
- How does Keras handle missing data?
A) By replacing missing data with zeros
B) By creating a separate category for missing data
C) By imputing missing data with mean or median values
D) Keras does not handle missing data
Answer: C) By imputing missing data with mean or median values
- What is ensemble learning in Keras?
A) Combining multiple models to improve model accuracy
B) Training a single model with multiple layers
C) Using pre-trained models for transfer learning
D) Using a data generator to create new training data
Answer: A) Combining multiple models to improve model accuracy
- How does transfer learning improve model performance in Keras?
A) By reducing overfitting
B) By increasing model accuracy
C) By reducing training time
D) By reducing the need for data augmentation
Answer: B) By increasing model accuracy
- What is the purpose of a dropout layer in Keras?
A) To add non-linearity to the model
B) To reduce overfitting
C) To increase model accuracy
D) To speed up model training
Answer: B) To reduce overfitting
- How does Keras handle categorical data?
A) By replacing categories with numerical values
B) By creating a separate category for each level
C) By using one-hot encoding
D) By imputing missing data with mean or median values
Answer: C) By using one-hot encoding
- What is the purpose of batch normalization in Keras?
A) To add non-linearity to the model
B) To reduce overfitting
C) To increase model accuracy
D) To speed up model training
Answer: B) To reduce overfitting
- Which Keras optimizer is commonly used for deep learning tasks?
A) Adam
B) Stochastic Gradient Descent
C) Adagrad
D) Naive Bayes
Answer: A) Adam
- What is the purpose of a learning rate in Keras?
A) To increase model accuracy
B) To reduce overfitting
C) To speed up model training
D) To control the step size in model optimization
Answer: D) To control the step size in model optimization
- Which of the following is a Keras tool for model tuning?
A) GridSearchCV
B) KMeans
C) PCA
D) Ridge Regression
Answer: A) GridSearchCV
- Which of the following is not a Keras callback function?
A) ModelCheckpoint
B) EarlyStopping
C) ReduceLROnPlateau
D) GradientDescent
Answer: D) GradientDescent
- What is the purpose of a validation set in Keras?
A) To test the model on new data
B) To find the best hyperparameters
C) To evaluate the model during training
D) To create new training data
Answer: C) To evaluate the model during training
- Which Keras layer type is commonly used for language translation tasks?
A) Embedding
B) Convolutional
C) Recurrent
D) Dense
Answer: C) Recurrent
- What is the purpose of a pooling layer in Keras?
A) To reduce overfitting
B) To increase model accuracy
C) To reduce model size
D) To reshape data
Answer: C) To reduce model size
- How does regularization reduce overfitting in Keras?
A) By adding noise to the model
B) By adding new layers to the model
C) By adding a penalty term to the loss function
D) By reducing the learning rate
Answer: C) By adding a penalty term to the loss function
- Which of the following is a Keras tool for model deployment?
A) TensorFlow Serving
B) PyTorch Serving
C) KubeFlow
D) None of the above
Answer: A) TensorFlow Serving
- What is the purpose of a recurrent layer in Keras?
A) To add non-linearity to the model
B) To reduce overfitting
C) To model sequential data
D) To increase model accuracy
Answer: C) To model sequential data
- How does Keras handle imbalanced data?
A) By creating synthetic data
B) By undersampling the majority class
C) By oversampling the minority class
D) All of the above
Answer: D) All of the above
- Which Keras activation function is commonly used for binary classification tasks?
A) Sigmoid
B) Tanh
C) ReLU
D) Softmax
Answer: A) Sigmoid
- What is the purpose of a convolutional layer in Keras?
A) To add non-linearity to the model
B) To reduce overfitting
C) To model sequential data
D) To detect patterns in image data
Answer: D) To detect patterns in image data
- What is the purpose of data normalization in Keras?
A) To reduce overfitting
B) To increase model accuracy
C) To speed up model training
D) To make input data more consistent
Answer: D) To make input data more consistent
- Which Keras layer type is commonly used for sequence-to-sequence tasks?
A) Embedding
B) Convolutional
C) Recurrent
D) Transformer
Answer: D) Transformer
- Which Keras loss function is commonly used for classification tasks with more than two classes?
A) Mean Square Error
B) Categorical Crossentropy
C) Binary Crossentropy
D) Huber Loss
Answer: B) Categorical Crossentropy
- Which of the following is not a Keras regularization technique?
A) L1 Regularization
B) L2 Regularization
C) Dropout
D) None of the above
Answer: D) None of the above
- What is the purpose of a data generator in Keras?
A) To create new training data
B) To preprocess input data
C) To reduce overfitting
D) To reduce the size of the model
Answer: A) To create new training data
- Which Keras activation function is commonly used for multi-class classification tasks?
A) Sigmoid
B) Tanh
C) ReLU
D) Softmax
Answer: D) Softmax
- What is the purpose of a residual block in Keras?
A) To reduce overfitting
B) To increase model accuracy
C) To speed up model training
D) To make it easier to train deep models
Answer: D) To make it easier to train deep models
Latest posts by Ashwani Kumar (see all)
- Top 10 DevOps Trainers in the world - October 7, 2023
- What is Cookies and Why it is Used? - May 24, 2023
- TOP trends of transitions in TikTok - May 10, 2023