Frameworks & Practical Workflow
Certified Deep Learning Specialist (CDLS) · 50 questions
- In PyTorch, what is the primary role of the torch.optim module?
- A team needs to run a trained image classifier on a low-power embedded sensor that has no GPU. What is the most effective way to speed up inference in this environment?
- In a PyTorch training script, what is the main job of the DataLoader class?
- A team is building a sentiment classifier from raw customer product reviews. Before feeding the text into any embedding or vectorization step, what preprocessing is most commonly applied first?
- While fine-tuning a pretrained Keras model, an engineer wants to keep the weights of the early convolutional layers fixed so only the new top layers learn. Which property accomplishes this on a per-layer basis?
- What is the main objective when a data scientist applies standardization to a numeric feature before training?
- A new team member asks what the term 'pipeline' refers to in the context of a deep learning project. What is the best description?
- In TensorFlow, what is a tf.Variable primarily used for?
- During data preprocessing with pandas, when is it most appropriate to use a Python lambda function with .apply()?
- A dataset includes a categorical feature with exactly 5 possible, unordered values (e.g., shipping method). Which encoding is generally best before feeding this feature into a neural network?
- When building and training a Sequential model in Keras, which order of method calls reflects the correct standard workflow?
- A Keras training run sometimes overfits in later epochs. Which built-in callback should be used to automatically save only the model weights from the epoch with the best validation loss?
- What is the fundamental purpose of hyperparameter tuning in a deep learning workflow?
- Why does the file size and parameter count of a trained model matter so much specifically when deploying to a mobile phone?
- A dataset has a feature that ranges from 1 to 1000, with no significant outliers, and the team wants all input features bounded within a fixed, known range for a neural network. Which scaling technique fits best?
- What does one-hot encoding fundamentally accomplish when applied to a categorical feature?
- When implementing a custom loss function as a class in PyTorch, which base class should it inherit from to integrate properly with the training loop?
- An engineer wants Keras training to automatically halt if the validation loss has not improved for a specified number of consecutive epochs. Which callback provides this behavior?
- Which specific technique transforms a numeric feature so that it ends up with a mean of 0 and a standard deviation of 1?
- A vision team applies random rotations, flips, and slight color jitter to their training images before each epoch. What is the main goal of this technique?
- A junior engineer proposes tuning the model's hyperparameters directly against the test set to save time, skipping a separate validation set. What is the main problem with this approach?
- In a typical deep learning workflow, what role does the pandas library primarily serve?
- Why do many data scientists prefer developing and exploring a deep learning model inside a Jupyter Notebook rather than a plain script?
- A student asks what makes a value inside a neural network count as a 'trainable parameter.' What is the best definition?
- A computer vision team needs to efficiently load thousands of images in shuffled mini-batches during PyTorch training, ideally using multiple worker processes in parallel. Which class is designed for this?
- In a standard PyTorch training loop, after loss.backward() has computed gradients for every parameter, what is the job of the optimizer object (for example, an instance of torch.optim.SGD)?
- A research team is designing a novel architecture with a custom, non-standard training loop that changes behavior based on intermediate outputs. They choose PyTorch over a high-level framework like Keras. What is the main advantage driving that choice?
- In NumPy terms commonly used to describe deep learning data, what distinguishes a vector from a scalar?
- During model development, a team checks performance on a held-out validation set after every epoch and adjusts hyperparameters based on the results. What is the primary purpose of that validation set?
- In a Keras workflow, after a model has been built and compiled, what does calling model.fit(xtrain, ytrain) do?
- A dataset has one feature where 99% of values fall between 0 and 100, but a handful of extreme outliers reach 100,000. If min-max scaling is applied to squeeze this feature into [0, 1], what problem results?
- A colleague adds np.random.seed(42) and torch.manualseed(42) at the top of a training script before any weight initialization or data shuffling happens. Why bother setting a random seed like this?
- A team has finished all hyperparameter tuning and model selection using their training and validation sets. They now evaluate the final chosen model on a completely separate set of data for the first and only time. What is the main purpose of this last set?
- Before feeding pixel values and other numeric features into a neural network, a data scientist rescales them so all values fall within a common range such as [0, 1]. What is this preprocessing step generally called, and what does it accomplish?
- A dataset is far too large to fit entirely into GPU memory at once. What is the standard, memory-efficient approach for training a neural network on data like this?
- Why is a dataset typically split into training, validation, and test sets rather than using all available data for training?
- A developer wants a quick printed overview of every layer in a Keras model, including each layer's output shape and how many trainable parameters it contributes. Which method provides this?
- In TensorFlow, what fundamentally is a Tensor, the central data structure the framework is named after?
- What defines a Dense (fully connected) layer in a neural network?
- A categorical feature has more than 50 distinct values (for example, a 'city' column with hundreds of possible cities). If this feature is one-hot encoded, what problem is likely to arise?
- A developer needs a NumPy array filled entirely with zeros, with shape (3, 4, 5) to use as a placeholder tensor. Which line of code correctly creates it?
- After defining a Keras model's layers, which method must be called to configure it with an optimizer, loss function, and metrics before training can begin?
- Training crashes partway through with a CUDA out-of-memory warning. The team wants to resolve it quickly without redesigning the model architecture. What is the simplest effective fix?
- What is the main role that the NumPy library plays in a typical deep learning workflow?
- A junior engineer splits a dataset into train and test sets simply by taking the first 80% of rows as train and the last 20% as test, without shuffling first. What common pitfall does this risk?
- A batch of text sequences fed into an RNN has varying lengths — some 10 words, some 40 words. Since a batch tensor requires a single, uniform shape, what technique is used to make all sequences in the batch the same length?
- A Python script uses the built-in pickle library to persist a trained scikit-learn model object to disk, then loads it back later in a separate script. What is pickle's role in this workflow?
- A team wants to augment their image training set by randomly flipping images horizontally during training, without writing custom flip logic from scratch. Which of these offers this built in?
- In frameworks like Keras, what is a callback in the context of model training?
- Beyond the high-level Keras API, what is the main purpose of the TensorFlow core library itself?