1. Home
  2. Explore
  3. Computer Science
  4. Deep Learning with Keras

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Deep Learning with Keras

  • 109Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Keras Foundations
Keras is a neural network API written in
and integrated with TensorFlow.

109 questions

  1. 1
    Keras is a neural network API written in
    _____
    and integrated with TensorFlow.
    Hint

    Think of the programming language used for the course implementations.

    Answer

    Python

    Explanation

    Keras is a neural network API written in Python and integrated with TensorFlow.

  2. 2
    Keras was developed to enable fast user
    _____
    , helping developers move from an idea to an implementation in few steps.
    Hint

    Consider what Keras is designed to make quick and convenient.

    Answer

    experimentation

    Explanation

    A focus on fast user experimentation is a central design goal of Keras.

  3. 3
    After learning the underlying concepts of neural networks, learning additional APIs is easier because their main differences are often
    _____
    differences.
    Hint

    The core concepts remain similar even when the code changes.

    Answer

    syntactical and implementation

    Explanation

    Once the underlying concepts are understood, syntactical and implementation differences between APIs are easier to learn.

  4. 4
    Learning multiple neural network APIs helps developers compare and contrast them and explain which API may suit particular
    _____
    .
    Hint

    Different tools may be better suited to different tasks.

    Answer

    problems

    Explanation

    Knowing multiple APIs supports informed comparisons about which API may work better for different problems.

  5. 5
    Because Keras is integrated with TensorFlow, installing
    _____
    also installs Keras.
    Hint

    The high-level API is packaged with this framework.

    Answer

    TensorFlow

    Explanation

    Keras comes packaged with the TensorFlow installation.

  6. 6
    The command-line command shown for installing TensorFlow and its integrated Keras API is
    _____
    Hint

    It begins with the Python package installer command.

    Answer

    pip install TensorFlow

    Explanation

    The installation procedure is to run pip install TensorFlow from the command line.

  7. 7
    A
    _____
    is not required to follow the course; the examples can run using only a CPU.
    Hint

    The alternative processor mentioned is sufficient for the course code.

    Answer

    GPU

    Explanation

    GPU support is optional, and the course code runs on a CPU alone.

  8. 8
    Before installing TensorFlow, users should check its system requirements to confirm that their machine meets the
    _____
    .
    Hint

    These describe the minimum system conditions for installation.

    Answer

    requirements

    Explanation

    TensorFlow's system requirements indicate whether a particular system can install it.

  9. 9
    In supervised learning, a data set used to train a neural network needs samples and their corresponding
    _____
    .
    Hint

    These provide the correct categories or targets for the examples.

    Answer

    labels

    Explanation

    Supervised training uses samples paired with labels that identify the desired outputs.

  10. 10
    Each individual data point in a data set is called a
    _____
    .
    Hint

    This is another name for one example in the data set.

    Answer

    sample

    Explanation

    A sample is an individual data point in the underlying data set.

  11. 11
    In deep learning, samples may also be called inputs or
    _____
    , while labels may be called targets or target data.
    Hint

    These terms refer to the data supplied to the model.

    Answer

    input data

    Explanation

    Samples are also referred to as inputs or input data; labels are also called targets or target data.

  12. 12
    For sentiment analysis of media headlines, each headline could have a label of positive or
    _____
    .
    Hint

    The example uses two opposing sentiment categories.

    Answer

    negative

    Explanation

    The described headline task assigns positive or negative labels.

  13. 13
    For a network classifying animal images, the labels in the example are
    _____
    or dogs.
    Hint

    The task distinguishes between two common household animals.

    Answer

    cats

    Explanation

    In the image-classification example, each image is labeled cat or dog.

  14. 14
    The first argument expected by the Keras fit function, x, contains the model's
    _____
    data.
    Hint

    This is the data made up of samples.

    Answer

    input

    Explanation

    The x parameter supplies the samples, also known as input data.

  15. 15
    The fit function's y argument contains the labels, also known as the
    _____
    data.
    Hint

    This term describes the desired outputs for the samples.

    Answer

    target

    Explanation

    The y parameter supplies target data, or labels, corresponding to the input samples.

  16. 16
    For x, the fit function can accept a NumPy array, TensorFlow tensor, dict, mapping, TF data set, or Keras
    _____
    .
    Hint

    This is an iterator-like way to supply batches of data.

    Answer

    generator

    Explanation

    The listed accepted formats include a Keras generator.

  17. 17
    The input samples and target labels supplied to fit must use the
    _____
    format.
    Hint

    The two arguments cannot use mismatched container types.

    Answer

    same

    Explanation

    The x and y data must have matching formats, such as both being NumPy arrays.

  18. 18
    The course's first numerical example converts both the sample list and label list into
    _____
    arrays for model input.
    Hint

    This common Python library provides the array type used in the example.

    Answer

    NumPy

    Explanation

    Both lists are transformed into NumPy arrays to match the chosen data format.

  19. 19
    Normalizing or standardizing data can make it easier or more efficient for a model to
    _____
    .
    Hint

    The processing is intended to help the training process.

    Answer

    learn

    Explanation

    Data normalization or standardization can place data in a form that is easier or more efficient for a model to learn from.

  20. 20
    The imagined clinical trial contains 2,100 participants split evenly between people younger than 65 and people aged 65 or
    _____
    .
    Hint

    The two age groups are separated at age 65.

    Answer

    older

    Explanation

    Half of the 2,100 participants were under 65 and half were 65 or older.

  21. 21
    The ages used to generate the clinical-trial samples range from
    _____
    to 100.
    Hint

    This is the lower endpoint of the age range.

    Answer

    13

    Explanation

    The synthetic data represents individuals ranging in age from 13 to 100.

  22. 22
    In the trial story, about 95% of the older participants experienced side effects, while about 95% of the younger participants experienced
    _____
    .
    Hint

    The majority outcomes differ between the two age groups.

    Answer

    no side effects

    Explanation

    The story assigns side effects to about 95% of older patients and no side effects to about 95% of younger patients.

  23. 23
    The minority cases in the synthetic trial are younger patients with side effects and older patients with
    _____
    side effects.
    Hint

    These are the outcomes opposite to the majority pattern in each age group.

    Answer

    no

    Explanation

    The generated outlier groups are the roughly 5% of younger patients with side effects and the 5% of older patients without them.

  24. 24
    In the trial data, a label of 1 represents experiencing side effects, and a label of 0 represents
    _____
    side effects.
    Hint

    The zero label marks the absence of the outcome.

    Answer

    no

    Explanation

    The data-generation scheme uses 1 for side effects and 0 for no side effects.

  25. 25
    After generating samples and labels, both lists are shuffled correspondingly to remove any imposed
    _____
    from data generation.
    Hint

    The generated groups might otherwise appear in a predictable sequence.

    Answer

    order

    Explanation

    Shuffling samples and their corresponding labels removes order imposed by the generation process while preserving their pairings.

  26. 26
    The MinMaxScaler in the example rescales ages from 13–100 to the feature range
    _____
    to 1.
    Hint

    This is the lower endpoint of the selected feature range.

    Answer

    0

    Explanation

    A feature range of zero to one rescales the original age values to that interval.

  27. 27
    Because the age data is one-dimensional, it must be reshaped before using the scaler's fit transform function, which does not accept one-dimensional data by
    _____
    .
    Hint

    The issue concerns the usual behavior without changing the input shape.

    Answer

    default

    Explanation

    The example reshapes the one-dimensional data because fit transform does not accept one-dimensional input by default.

  28. 28
    A Keras sequential model is described as a linear stack of
    _____
    .
    Hint

    These are the components arranged one after another in the model.

    Answer

    layers

    Explanation

    A sequential model organizes its layers in a linear stack.

  29. 29
    In a sequential model, the input layer is not explicitly defined; the input data itself creates the input layer, and the first explicitly added layer is a
    _____
    layer.
    Hint

    It is the first layer that performs processing after the input.

    Answer

    hidden

    Explanation

    The input data defines the input layer implicitly, so the first dense layer in the example is the first hidden layer.

  30. 30
    The input shape parameter on the first hidden layer tells the model what shape of input data to
    _____
    .
    Hint

    It specifies the dimensions the model should receive.

    Answer

    expect

    Explanation

    The first layer's input shape parameter communicates the expected shape of the input data.

  31. 31
    In the numerical sequential model, the first dense hidden layer has 16 units and uses the
    _____
    activation function.
    Hint

    This common activation function follows the first dense layer in the example.

    Answer

    relu

    Explanation

    The first hidden dense layer uses 16 units followed by the relu activation function.

  32. 32
    The second hidden dense layer in the numerical example has
    _____
    units.
    Hint

    This layer has twice as many units as the first hidden layer.

    Answer

    32

    Explanation

    The example assigns 32 units to the second hidden dense layer.

  33. 33
    The example's choices of 16 and 32 hidden units are described as relatively
    _____
    .
    Hint

    They are not presented as uniquely optimal values.

    Answer

    arbitrary

    Explanation

    The unit counts are chosen arbitrarily for the simple example rather than derived as uniquely required values.

  34. 34
    A dense layer is also known as a fully connected or
    _____
    connected layer.
    Hint

    The layer name describes how its units connect.

    Answer

    densely

    Explanation

    A dense layer is a densely connected, or fully connected, layer.

  35. 35
    The numerical example's output layer has two units because the classification task has
    _____
    possible classes.
    Hint

    The classes are experiencing side effects or not experiencing them.

    Answer

    two

    Explanation

    One output unit corresponds to each of the two possible side-effect classes.

  36. 36
    The softmax activation on a classification output layer produces a probability for each output
    _____
    .
    Hint

    Each possible category receives its own score interpreted as a probability.

    Answer

    class

    Explanation

    Softmax converts output values into probabilities over the possible classes.

  37. 37
    Calling compile prepares a model for training by configuring items such as its optimizer, loss, and
    _____
    .
    Hint

    These are used to evaluate performance during training.

    Answer

    metrics

    Explanation

    Compilation configures the elements needed before training, including the optimizer, loss, and metrics.

  38. 38
    The numerical model uses the Adam optimizer with a learning rate of
    _____
    .
    Hint

    The value is a small decimal specified during compilation.

    Answer

    0.0001

    Explanation

    The example compiles the model with Adam and a learning rate of 0.0001.

  39. 39
    The numerical model uses sparse categorical cross entropy as its
    _____
    .
    Hint

    This compilation setting measures prediction error for training.

    Answer

    loss

    Explanation

    Sparse categorical cross entropy is the loss specified for the numerical classification example.

  40. 40
    In the numerical example, accuracy is included as a model performance
    _____
    .
    Hint

    It is the measure used to judge how often predictions are correct.

    Answer

    metric

    Explanation

    Accuracy is the metric chosen to assess the model's performance.

  41. 41
    The model begins training when its
    _____
    function is called.
    Hint

    This function receives the input samples and target labels for training.

    Answer

    fit

    Explanation

    Calling fit starts the training process using the supplied data.

  42. 42
    A batch size of 10 means that the network processes
    _____
    samples together at one time.
    Hint

    The batch size is the number of samples in one training batch.

    Answer

    10

    Explanation

    The batch size specifies how many samples are passed to and processed by the network at one time.

  43. 43
    An epoch is one pass through all of the data in the data set; therefore, 30 epochs process the full set
    _____
    times.
    Hint

    The epoch count specifies the number of complete passes.

    Answer

    30

    Explanation

    Training for 30 epochs means that the model processes all the data 30 times.

  44. 44
    The fit function shuffles training data by default, which helps prevent the model from learning accidental patterns in the data's
    _____
    .
    Hint

    The concern is the sequence in which samples happen to appear.

    Answer

    order

    Explanation

    Shuffling erases imposed ordering so the model is not encouraged to learn from the order of the data set.

  45. 45
    Keras verbose level 2 is the most verbose option among levels 0, 1, and
    _____
    .
    Hint

    It is the highest-numbered level listed in the example.

    Answer

    2

    Explanation

    The example identifies level 2 as producing the most comprehensive output.

  46. 46
    A validation set is held out from training so that model performance can be checked on data the model was not exposed to during
    _____
    .
    Hint

    The purpose is to evaluate predictions on separate examples.

    Answer

    training

    Explanation

    Validation data provides a check of how the model performs on data that is not used to train it.

  47. 47
    During each epoch with validation enabled, the model first trains on training data and then makes predictions on the
    _____
    data.
    Hint

    This is the held-out set used to check performance during training.

    Answer

    validation

    Explanation

    After training in each epoch, the model evaluates its learned patterns by predicting on the validation set.

  48. 48
    A validation set is not used to update the model during training; it is used to measure how well the model can
    _____
    .
    Hint

    This means performing well on data that was not used for learning.

    Answer

    generalize

    Explanation

    Validation assesses the model's ability to generalize beyond the training data rather than contributing to training.

  49. 49
    Overfitting occurs when a model learns the specific features of its training set but cannot
    _____
    well to unseen data.
    Hint

    The model performs well on examples it has seen but poorly on new ones.

    Answer

    generalize

    Explanation

    An overfit model has learned training-set specifics without performing well on data it has not seen.

  50. 50
    A pattern of strong training results but substantially weaker validation results indicates a likely
    _____
    problem.
    Hint

    The gap suggests the model is not transferring its learning to held-out examples.

    Answer

    overfitting

    Explanation

    When training performance is much better than validation performance, the model may be overfitting.

  51. 51
    One way to provide validation data to fit is to pass a separate set using the
    _____
    data parameter.
    Hint

    The parameter name identifies the held-out data supplied directly.

    Answer

    validation

    Explanation

    A separately prepared validation set can be passed to fit through its validation data parameter.

  52. 52
    The validation split parameter asks Keras to reserve a fraction between
    _____
    and 1 of the training set for validation.
    Hint

    The permitted fraction begins at zero.

    Answer

    0

    Explanation

    Validation split takes a fractional value between zero and one to select the portion reserved for validation.

  53. 53
    With validation split, the selected fraction is removed from the training set and used as validation data; it is not retained in the training
    _____
    .
    Hint

    The validation examples are held out rather than used for parameter updates.

    Answer

    set

    Explanation

    Keras separates the selected examples from the training data for validation.

  54. 54
    Keras applies validation split before it shuffles the remaining training data, so the original data should be shuffled
    _____
    to avoid a biased validation subset.
    Hint

    The remedy is to randomize the order before calling fit.

    Answer

    beforehand

    Explanation

    Because validation split selects a portion before the fit-time shuffle, pre-shuffling helps ensure that the validation subset is representative.

  55. 55
    Similar training and validation accuracy and loss suggest that a model is
    _____
    well rather than overfitting strongly.
    Hint

    This describes success on data outside the training set.

    Answer

    generalizing

    Explanation

    Comparable training and validation performance indicates that the model is performing similarly on held-out data.

  56. 56
    Using a trained model to infer properties of previously unseen data is called
    _____
    .
    Hint

    This is the stage where the model applies what it learned to new examples.

    Answer

    inference

    Explanation

    Inference uses the model's learned knowledge to make predictions about data it has not seen before.

  57. 57
    A test set is commonly held out and used for inference after the model has been trained and
    _____
    .
    Hint

    This step checks performance during training using a separate set.

    Answer

    validated

    Explanation

    The described workflow uses the model on test data after training and validation.

  58. 58
    The test set offers an additional check of generalization before a model is deployed to
    _____
    .
    Hint

    This is the setting where the model is released for practical use.

    Answer

    production

    Explanation

    Evaluating on test data provides another generalization check before deployment to production.

  59. 59
    During inference, the model receives the test inputs but does not need the correct test
    _____
    to generate predictions.
    Hint

    These are the answers used later to evaluate predictions.

    Answer

    labels

    Explanation

    Inference generates predictions from input data; correct labels are not required to produce them.

  60. 60
    For a two-class model, each prediction can provide a probability for each of the two output
    _____
    .
    Hint

    The probabilities correspond to the possible categories.

    Answer

    classes

    Explanation

    The model's output gives probabilities associated with each class, such as the two side-effect outcomes.

  61. 61
    Applying argmax to a prediction selects the index with the
    _____
    probability.
    Hint

    It identifies the most likely class among the model outputs.

    Answer

    highest

    Explanation

    Argmax returns the index of the largest probability, giving the most probable predicted class.

  62. 62
    A confusion matrix compares predicted labels with the
    _____
    labels for a test set.
    Hint

    These are the known correct labels used to evaluate predictions.

    Answer

    true

    Explanation

    The confusion matrix uses true labels alongside predicted labels to summarize classification results.

  63. 63
    In the described confusion matrix plot, predicted labels are on the x-axis and
    _____
    labels are on the y-axis.
    Hint

    This axis contains the reference categories rather than the model outputs.

    Answer

    true

    Explanation

    The plot places predicted labels on the x-axis and true labels on the y-axis.

  64. 64
    In a standard confusion matrix, correct predictions lie along the diagonal running from the top left to the
    _____
    .
    Hint

    The diagonal pairs matching predicted and true classes.

    Answer

    bottom right

    Explanation

    Cells on the top-left to bottom-right diagonal represent correct predictions.

  65. 65
    A model's test accuracy from a confusion matrix is the number of correct predictions divided by the
    _____
    number of predictions.
    Hint

    The denominator includes both correct and incorrect outcomes.

    Answer

    total

    Explanation

    Accuracy is calculated by dividing correct predictions by all predictions.

  66. 66
    The model save method stores its architecture, learned weights, training configuration, and the optimizer's
    _____
    .
    Hint

    Saving this lets training resume from where it left off.

    Answer

    state

    Explanation

    The comprehensive save option includes the optimizer state as well as architecture, weights, and training configuration.

  67. 67
    Loading a fully saved Keras model can restore its architecture, weights, and training setup using the
    _____
    function.
    Hint

    This function reads a previously saved complete model from disk.

    Answer

    load model

    Explanation

    The load model function restores a model saved with the comprehensive save method.

  68. 68
    Saving a model to JSON preserves its
    _____
    but not its weights or training configuration.
    Hint

    This describes the layers and structure of the model.

    Answer

    architecture

    Explanation

    The JSON option stores the model architecture only; the model would need to be compiled and trained to obtain updated weights and training settings.

  69. 69
    When saving only model weights, a later model must have a matching
    _____
    so those weights can be loaded correctly.
    Hint

    The layers and parameter shapes must correspond to the saved values.

    Answer

    architecture

    Explanation

    Weights can be loaded into a newly created model only when its architecture has compatible parameter shapes.

  70. 70
    The Keras method for saving only a model's learned parameters is save
    _____
    .
    Hint

    This option excludes the model architecture and training configuration.

    Answer

    weights

    Explanation

    The save weights method saves only the model's weights.

  71. 71
    A YAML string can be used instead of JSON to save and reconstruct a model's
    _____
    .
    Hint

    Both string formats describe the model structure.

    Answer

    architecture

    Explanation

    The same architecture-only process can use YAML with the corresponding YAML serialization and loading functions.

  72. 72
    The cat-and-dog image task uses labeled images organized into training, validation, and
    _____
    sets.
    Hint

    This is the set used for the final inference evaluation.

    Answer

    test

    Explanation

    The image workflow divides its data into training, validation, and test sets.

  73. 73
    The original Kaggle cat-and-dog training folder contains about
    _____
    images, although the example uses only a small subset.
    Hint

    It is a five-digit total described as more than needed for the demonstrations.

    Answer

    25,000

    Explanation

    The downloaded training data set contains 25,000 cat and dog images; the example uses a smaller subset to reduce training time.

  74. 74
    The cat-and-dog example selects 1,000 training images, 200 validation images, and
    _____
    test images.
    Hint

    This is the smallest of the three selected set sizes.

    Answer

    100

    Explanation

    The chosen subset includes 1,000 training, 200 validation, and 100 test images.

  75. 75
    For the cat-and-dog data, each of the three sets is divided evenly between the
    _____
    classes.
    Hint

    The classes are cat and dog.

    Answer

    two

    Explanation

    The example selects equal numbers of cat and dog images for training, validation, and testing.

  76. 76
    Keras image data generators can create batches directly from organized directories using flow from
    _____
    .
    Hint

    The function reads images from the folder structure on disk.

    Answer

    directory

    Explanation

    The flow from directory method creates directory iterators that supply batches from image folders.

  77. 77
    The cat-and-dog image pipeline resizes images to a target size of
    _____
    by 224 pixels.
    Hint

    The target images are square.

    Answer

    224

    Explanation

    The example sets the image target size to 224 by 224 pixels.

  78. 78
    The cat-and-dog image batches use a batch size of
    _____
    .
    Hint

    This is the number of images in each batch in the example.

    Answer

    10

    Explanation

    The directory iterators are configured with a batch size of 10.

  79. 79
    The test image iterator is configured with shuffle set to false so test samples remain aligned with their
    _____
    labels.
    Hint

    The labels need to stay paired with the corresponding examples for evaluation.

    Answer

    true

    Explanation

    Keeping test data unshuffled preserves the mapping between test images and their labels for the confusion matrix.

  80. 80
    The image generator applies the VGG 16 preprocessing function so images are prepared in the way expected by
    _____
    .
    Hint

    This is the pretrained architecture whose preprocessing is being matched.

    Answer

    VGG 16

    Explanation

    The pipeline applies the VGG 16 preprocessing function to make image inputs consistent with that model's training preparation.

  81. 81
    VGG 16 preprocessing subtracts the training-set mean for each of the red, green, and
    _____
    channels from pixel values.
    Hint

    The image channels are the three components of RGB.

    Answer

    blue

    Explanation

    The described preprocessing subtracts the mean RGB value computed on the training set from each corresponding pixel channel.

  82. 82
    In the cat-and-dog generator, labels are represented as one-hot vectors, such as 1, 0 for cat and 0, 1 for
    _____
    .
    Hint

    This is the other class in the two-category image task.

    Answer

    dog

    Explanation

    The example represents cat with [1, 0] and dog with [0, 1].

  83. 83
    A convolutional layer that accepts RGB images uses an input shape with three color channels because RGB has
    _____
    channels.
    Hint

    The name RGB lists the channel components.

    Answer

    three

    Explanation

    An RGB image has red, green, and blue channels, so its channel dimension is three.

  84. 84
    The first convolutional layer in the example uses 32 filters with a kernel size of
    _____
    by 3.
    Hint

    The chosen kernels are square and commonly used for image data.

    Answer

    3

    Explanation

    The example uses 32 filters and a 3-by-3 kernel in its first convolutional layer.

  85. 85
    The CNN's first max pooling layer uses a pool size of 2 by 2, reducing each image dimension by about
    _____
    .
    Hint

    The pooling operation halves the height and width in this example.

    Answer

    half

    Explanation

    A 2-by-2 max pooling layer with stride 2 cuts the image dimensions in half.

  86. 86
    Before reaching the dense output layer, the CNN uses a
    _____
    layer to turn its multidimensional feature maps into a one-dimensional tensor.
    Hint

    The layer's name describes converting a structured array into a single vector.

    Answer

    flatten

    Explanation

    Flatten converts the convolutional feature maps into a one-dimensional tensor for the dense layer.

  87. 87
    The scratch-built cat-and-dog CNN reached 100% training accuracy but only about 69% validation accuracy, indicating
    _____
    .
    Hint

    The gap shows weak performance on data held out from training.

    Answer

    overfitting

    Explanation

    The large difference between training and validation accuracy indicates that the model did not generalize well.

  88. 88
    The pretrained VGG 16 model won the
    _____
    ImageNet competition.
    Hint

    The year is stated in the model's introduction.

    Answer

    2014

    Explanation

    VGG 16 is identified as the model that won the 2014 ImageNet competition.

  89. 89
    The original VGG 16 model was trained to classify images into
    _____
    ImageNet classes.
    Hint

    This is far more categories than the two in the cat-and-dog task.

    Answer

    1,000

    Explanation

    The original VGG 16 output layer contains 1,000 ImageNet classes.

  90. 90
    Cats and dogs were already included in the ImageNet data used to train VGG 16, so adapting it to those classes requires relatively little
    _____
    .
    Hint

    This is the process of adjusting a pretrained model for a task.

    Answer

    fine tuning

    Explanation

    Because VGG 16 had already encountered cats and dogs, only minimal changes and training were needed for the two-class task.

  91. 91
    To adapt VGG 16 to cat-and-dog classification, the original 1,000-class output layer is replaced with an output layer containing
    _____
    units.
    Hint

    One unit corresponds to each target category.

    Answer

    two

    Explanation

    The modified model predicts the two classes cat and dog rather than the original 1,000 classes.

  92. 92
    In the VGG 16 fine-tuning example, the pretrained layers are frozen so their learned
    _____
    and biases are not retrained.
    Hint

    These parameters encode what the model learned during its original training.

    Answer

    weights

    Explanation

    Setting the pretrained layers to non-trainable keeps their weights and biases fixed during the new training process.

  93. 93
    With the VGG 16 layers frozen, the newly added output layer is the only
    _____
    layer in the example.
    Hint

    This layer is the one whose parameters are updated for the new task.

    Answer

    trainable

    Explanation

    The example freezes the pretrained layers and trains only the new two-class output layer.

  94. 94
    Fine tuning and transfer learning let a model apply knowledge from its original data set to a new or custom
    _____
    .
    Hint

    The goal is to reuse what the pretrained model has learned.

    Answer

    data set

    Explanation

    Transfer learning carries learned information from an original task to a new data set or task.

  95. 95
    MobileNets are designed as lightweight, low-power, low-latency CNNs suited to uses such as classification and
    _____
    .
    Hint

    This is another common computer-vision task mentioned alongside classification.

    Answer

    detection

    Explanation

    MobileNets can be used for classification, detection, and other tasks handled by convolutional neural networks.

  96. 96
    The largest MobileNet described is about 17 MB, compared with about 553 MB for VGG 16; the smaller size comes from having fewer model
    _____
    .
    Hint

    These include the learned weights and biases.

    Answer

    parameters

    Explanation

    Model size is related to the number of parameters; the described MobileNet has far fewer than VGG 16.

  97. 97
    The compared 17 MB MobileNet has about 4.2 million parameters, whereas VGG 16 has about
    _____
    million.
    Hint

    This is the much larger parameter count in the comparison.

    Answer

    138

    Explanation

    The comparison gives about 4.2 million parameters for MobileNet and 138 million for VGG 16.

  98. 98
    A trade-off for MobileNets' smaller size and faster operation is somewhat lower
    _____
    .
    Hint

    This measures how often the model classifies correctly.

    Answer

    accuracy

    Explanation

    MobileNets are typically less accurate than resource-heavy models, though the described reduction can be relatively small.

  99. 99
    The sign-language digit data set contains
    _____
    classes, representing the digits zero through nine.
    Hint

    There is one class for each digit from zero to nine.

    Answer

    10

    Explanation

    The custom data set has ten classes, one for each sign-language digit.

  100. 100
    The custom sign-language task uses RGB images, and its directory classes correspond to digits from
    _____
    through nine.
    Hint

    This is the first digit in the range of classes.

    Answer

    zero

    Explanation

    The data set contains RGB images in ten class directories numbered zero through nine.

  101. 101
    In the MobileNet fine-tuning example, the output layer uses
    _____
    units to match the number of sign-language digit classes.
    Hint

    There is one output for each digit class.

    Answer

    10

    Explanation

    The new output layer has ten units, corresponding to the ten classes in the custom data set.

  102. 102
    For the custom MobileNet model, the example makes the last
    _____
    layers trainable and freezes the earlier ones.
    Hint

    This experimentally chosen number is fewer than the model's total layers.

    Answer

    23

    Explanation

    The example sets only the last 23 layers as trainable; this choice is presented as something to experiment with.

  103. 103
    For MobileNet image preprocessing, RGB pixel values are scaled from 0–255 to the range
    _____
    to 1.
    Hint

    The transformed range includes negative values as its lower endpoint.

    Answer

    -1

    Explanation

    MobileNet's preprocessing function scales image values to the interval from minus one to one.

  104. 104
    Data augmentation creates new data by making modifications to existing
    _____
    .
    Hint

    It expands a data set through transformations rather than collecting only new examples.

    Answer

    data

    Explanation

    Data augmentation generates additional examples by altering data that is already available.

  105. 105
    For images, augmentation can include horizontal or vertical flipping, rotating, or changing the image's
    _____
    .
    Hint

    This transformation changes the visual channel values.

    Answer

    color

    Explanation

    The examples of image augmentation include flipping, rotation, and changing color.

  106. 106
    A major reason to use data augmentation is to increase the amount of available
    _____
    .
    Hint

    The method is especially useful when the original set is limited.

    Answer

    data

    Explanation

    Augmentation creates additional training examples when access to enough data is a problem.

  107. 107
    A training set that is too small can contribute to
    _____
    , and augmentation may help reduce it.
    Hint

    This occurs when a model fits training examples but fails to generalize.

    Answer

    overfitting

    Explanation

    Increasing training diversity with augmented data can reduce overfitting associated with a small training set.

  108. 108
    Keras ImageDataGenerator supports transformations such as rotation, width and height shifts, zoom, channel shifts, and horizontal
    _____
    .
    Hint

    This transformation mirrors the image across a horizontal direction.

    Answer

    flip

    Explanation

    The example configures horizontal flipping along with rotation, shifts, zoom, and channel shifts.

  109. 109
    Randomly augmenting examples can make a training set more dynamic; for example, it can teach a classifier to recognize dogs facing both left and
    _____
    .
    Hint

    This is the opposite direction to the one in the example's original images.

    Answer

    right

    Explanation

    If training images show dogs facing only one direction, horizontal flips can add examples facing the other direction and improve variation.

1 of 109
Question 1 of 109

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent