




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The TensorFlow Developer Certificate Exam evaluates the ability to build and train machine learning models using TensorFlow. Topics include deep learning techniques, neural networks, and using TensorFlow for various machine learning tasks such as classification, regression, and reinforcement learning.
Typology: Exams
1 / 111
This page cannot be seen from the preview
Don't miss anything!





























































































Question 1. What is eager execution in TensorFlow 2.x? A) Lazy evaluation of tensors B) Immediate evaluation of operations, facilitating easier debugging and dynamic graph building C) A static graph mode for performance optimization D) A deprecated feature in TensorFlow 2.x Answer: B Explanation: Eager execution evaluates operations immediately, making TensorFlow more intuitive and easier to debug, unlike static graph mode. Question 2. Which TensorFlow function is used to convert a NumPy array into a TensorFlow tensor? A) tf.convert_to_tensor() B) tf.array() C) tf.cast() D) tf.tensorify() Answer: A Explanation: tf.convert_to_tensor() converts NumPy arrays and other data types into TensorFlow tensors for further operations. Question 3. How does tf.function improve TensorFlow code? A) It converts Python code into a static graph for performance
B) It automatically parallelizes code C) It visualizes the computation graph D) It simplifies debugging Answer: A Explanation: tf.function compiles a Python function into a static graph, optimizing execution speed and performance. Question 4. Which Keras API component is primarily used to build neural network models? A) keras.layers B) keras.models C) keras.optimizers D) keras.datasets Answer: B Explanation: keras.models is used to define, compile, and train models, including Sequential and Functional APIs. Question 5. When saving a trained model in TensorFlow, which format preserves the entire model architecture, optimizer state, and weights? A) HDF5 (.h5) B) SavedModel C) Checkpoint
Explanation: Data augmentation artificially enlarges the dataset through transformations, helping models generalize better. Question 8. Which activation function is most commonly used in hidden layers of neural networks for non-linear modeling? A) ReLU B) Sigmoid C) Softmax D) Tanh Answer: A Explanation: ReLU (Rectified Linear Unit) is widely used due to its simplicity and effectiveness in mitigating vanishing gradient problems. Question 9. What does the softmax activation function do in a neural network classifier? A) Outputs a probability distribution over classes B) Performs binary classification C) Normalizes inputs to zero mean D) Compresses data into a fixed size Answer: A Explanation: Softmax converts raw logits into probabilities, making it suitable for multi-class classification tasks.
Question 10. Which optimizer is known for adaptive learning rate adjustment and often used in training deep neural networks? A) SGD B) RMSprop C) Adam D) Momentum Answer: C Explanation: Adam combines adaptive learning rates with momentum, making it effective for training complex models. Question 11. In Keras, what is the primary role of the compile() method? A) To initialize model weights B) To configure the learning process with loss, optimizer, and metrics C) To train the model D) To save the model Answer: B Explanation: compile() sets up the model with specified loss functions, optimizers, and metrics before training. Question 12. Which method is used to train a Keras model? A) evaluate()
Answer: A Explanation: HDF5 (.h5) files save only model weights, which can be loaded into a model architecture. Question 15. When loading a saved model in TensorFlow, which function is used? A) tf.load() B) tf.keras.models.load_model() C) tf.load_model() D) tf.saved_model.load() Answer: B Explanation: load_model() loads a saved Keras model from disk, including architecture, weights, and optimizer state. Question 16. Which API in TensorFlow is used to create data pipelines for preprocessing datasets? A) tf.data B) tf.pipeline C) tf.dataset D) tf.preprocessing Answer: A
Explanation: tf.data provides tools for building complex, efficient data pipelines for model training. Question 17. Which method is used to apply transformations or augmentation to datasets in TensorFlow? A) map() B) transform() C) augment() D) apply() Answer: A Explanation: map() applies a function to each element in a dataset, useful for transformations and augmentations. Question 18. In neural network training, what is overfitting? A) When the model performs well on training data but poorly on unseen data B) When the model underfits the training data C) When training loss increases over epochs D) When the model has too few parameters Answer: A Explanation: Overfitting occurs when a model learns noise and details of training data, failing to generalize.
C) Feedforward Neural Network D) Autoencoder Answer: B Explanation: CNNs are designed for image data, leveraging convolutional layers to capture spatial hierarchies. Question 22. In a Conv2D layer, what does the kernel size specify? A) The size of the input image B) The size of the convolution filter C) The number of filters D) The stride of the convolution Answer: B Explanation: Kernel size defines the dimensions of the filter used to scan over the input image during convolution. Question 23. Which pooling layer is used to reduce spatial dimensions by taking the maximum value in each window? A) MaxPooling2D B) AveragePooling2D C) Conv2D D) Flatten Answer: A
Explanation: MaxPooling2D performs max pooling, which reduces dimensions by selecting the maximum value in each pooling window. Question 24. Why is transfer learning useful in image classification? A) It allows training from scratch on small datasets B) It leverages pre-trained models to improve performance and reduce training time C) It always results in higher accuracy than training from scratch D) It is only used for natural language processing Answer: B Explanation: Transfer learning uses pre-trained models as feature extractors, saving time and improving performance on limited data. Question 25. What is tokenization in NLP? A) Converting text into lowercase B) Splitting text into individual units like words or subwords C) Removing stop words D) Padding sequences Answer: B Explanation: Tokenization splits raw text into smaller units, such as words or subwords, for processing.
B) Performs convolution on text C) Embeds sequences into fixed-length vectors D) Normalizes input data Answer: A Explanation: Embedding layers learn dense vector representations of words, capturing semantic relationships. Question 29. How does a Bidirectional RNN differ from a standard RNN? A) It processes data in both forward and backward directions B) It only processes data in one direction C) It uses convolutional layers D) It is not suitable for sequence data Answer: A Explanation: Bidirectional RNNs analyze sequences in both directions, capturing context from past and future tokens. Question 30. Which layer type is typically used for text classification tasks with sequential data? A) Conv1D B) Dense C) Embedding followed by RNN or LSTM D) MaxPooling2D
Answer: C Explanation: Embedding layers followed by RNN or LSTM layers effectively model sequential text data for classification. Question 31. Which metric is most appropriate for evaluating a binary classification model? A) Accuracy B) Mean Absolute Error C) F1-score D) Both A and C Answer: D Explanation: Accuracy and F1-score are suitable for binary classification, with F1 balancing precision and recall. Question 32. What is MAE used for in time series forecasting? A) To measure the average magnitude of errors B) To evaluate classification accuracy C) To compute the loss in regression models D) Both A and C Answer: D Explanation: MAE assesses how close predictions are to actual values, useful in regression and forecasting.
A) To capture local features with CNN and long-term dependencies with RNN B) To reduce model complexity C) To perform image classification D) To normalize data Answer: A Explanation: Combining CNN and RNN layers leverages spatial feature extraction and temporal dependency modeling. Question 36. Which of the following is a common loss function for multi- class classification? A) Binary Crossentropy B) Categorical Crossentropy C) Mean Squared Error D) Hinge Loss Answer: B Explanation: Categorical Crossentropy is used when classes are mutually exclusive and labels are one-hot encoded. Question 37. What does the term 'epoch' refer to in training neural networks? A) One complete pass through the entire training dataset B) One update of model weights
C) The number of layers in a model D) The size of the batch Answer: A Explanation: An epoch indicates one full iteration over the training data during training. Question 38. How does batch size influence training? A) Larger batch sizes lead to more stable gradient estimates but require more memory B) Smaller batch sizes always lead to better generalization C) Batch size has no impact on training D) Larger batch sizes slow down training Answer: A Explanation: Larger batches produce more stable gradients but demand more computational resources. Question 39. Which evaluation metric is most suitable for imbalanced classification datasets? A) Accuracy B) Precision and Recall C) Mean Absolute Error D) F1-score
Question 42. Which pre-trained model is commonly used for image feature extraction? A) VGG B) BERT C) LSTM D) Reshape Answer: A Explanation: VGG16 is a popular CNN pre-trained on ImageNet, used for feature extraction in transfer learning. Question 43. In image preprocessing, what does normalization of pixel values typically involve? A) Scaling pixel values to [0,1] range B) Subtracting the mean C) Dividing by the standard deviation D) All of the above Answer: D Explanation: Normalization can involve scaling, mean subtraction, or standardization to improve training stability. Question 44. Which Keras layer is used to convert sequences of integers into dense vectors?
A) Embedding B) Dense C) Conv1D D) LSTM Answer: A Explanation: Embedding layers map integer sequences into dense vector representations capturing semantic info. Question 45. What is the primary function of the LSTM layer? A) To process sequential data with the ability to learn long-term dependencies B) To perform convolution C) To classify images D) To normalize input features Answer: A Explanation: LSTM is designed to handle long-term dependencies in sequence data, overcoming vanishing gradient issues. Question 46. Which metric is most appropriate for regression tasks? A) Accuracy B) Mean Absolute Error C) F1-score D) Precision