Deep Learning and AI SuperheroChapter 43
3. Deep Learning with Keras (Chapter 3)
Section 3 of 4-~ 12 min read-Synced from Cuantum content
- What is the main difference between the Sequential API and the Functional API in Keras?
- - a) The Sequential API is used for building complex models, while the Functional API is only for simple models.
- b) The Sequential API allows for more complex architectures, such as multi-input/output models, while the Functional API is limited to simple linear models.
- c) The Sequential API is used for building simple, linear stacks of layers, while the Functional API allows for more complex architectures like multiple inputs/outputs and shared layers.
- d) The Sequential API is used for transfer learning, and the Functional API is for training models from scratch.
- What is the purpose of the ModelCheckpoint callback in Keras?
- - a) To monitor model performance and stop training when it starts to overfit.
- b) To save the model’s weights or the entire model during training, often when the performance improves.
- c) To log the learning rate and other hyperparameters during training.
- d) To train the model with multiple datasets in parallel.
- How does EarlyStopping prevent overfitting in Keras models?
- - a) By reducing the learning rate automatically during training.
- b) By stopping the training process once the model’s performance on the validation set ceases to improve.
- c) By saving the best-performing model during training.
- d) By skipping validation steps to increase training speed.
- When deploying a Keras model using Flask, what is the typical purpose of the Flask framework?
- - a) To scale machine learning models for distributed training.
- b) To build a lightweight web application that serves predictions via a RESTful API.
- c) To optimize model performance in mobile applications.
- d) To perform hyperparameter tuning during training.
- What is the primary purpose of converting a Keras model to TensorFlow Lite format?
- - a) To train the model faster using GPUs.
- b) To enable the model to run efficiently on mobile or embedded devices.
- c) To improve the accuracy of the model on large datasets.
- d) To reduce the time needed for training the model on cloud infrastructure.