---
# System prepended metadata

title: VL Hands-on AI I Exam 1 and 2 WS2020
tags: [2020S, Exam, Hands-on AI]

---

# VL Hands-on AI I Exam 1 and 2 WS2020

###### tags: `Exam` `Hands-on AI` `2020S`

## EXAM 1

**Q:** Affinity Propagation ...

* ... does not need a fixed number of cluster centers as input.
* ... is a clustering method.

---
**Q:** A polynomial of degree one ...

* ... is a straight line. 
* ... has two parameters to be adjusted.

---
**Q:** The logistic function "y = sigma(x)" ...

* ... is 0.5 for "x = 0".
* ... has output values "y" between 0 and +1.

---
**Q:** Principal Component Analysis ...

* ... enables visualization of high-dimensional data.
* ... is a dimensionality reduction method. 

---
**Q:** Which of the following is a meaningful data augmentation?

* Rotating an image by 270 degrees.
* Rotating an image by 90 degrees.
* Rotating an image by 180 degrees. 

---
**Q:** Which of the following statements is/are true about the test set method?

* The test set is used to estimate the risk. 
* The underlying assumption is that samples are identically and independently distributed.
* Empirical risk minimization is performed on the training set.


---
**Q:** Which of the following statements is/are true about an 8-bit RGB image?

* Every pixel is represented by 3 channels.
* Every channel can encode 2^8 different values.
* Every channel can encode 256 different values.

---
**Q:** In which format comes the Iris dataset?

* Tabular
---
**Q:** What of the following is true about a regression task?
 
* The mean-squared error is a suitable loss function.
* The target is a numerical value.

---
**Q:** What are strengths of frameworks like PyTorch?

* Easy switching of computations between CPU and GPU.
* Automatic differentiation.
* Straightforward construction of neural networks.

---
**Q:** What is typical for a supervised machine learning task?

* Learning a mapping from input to target values.
* Learning with knowing the input and target values.
---
**Q:** Which of the following statements is/are true about under- and overfitting?

* If you run into underfitting, the model has most probably problems to fit the training data.
* If you run into underfitting, the model complexity is probably too low.
* If you run into overfitting, the model has most probably fitted the training data pretty well.
* If you run into overfitting, the model complexity is probably too high.
---
**Q:** Which of the following statements is/are true about the generalization error?

* It is straightforward to calculate, if the distribution of future, unseen data is known.
* It is defined as the error on on future, unseen data.
---
**Q:** Which of the following statements is/are true about a greyscale 16-bit image?

* Every channel can encode 2^16 different values.

---
**Q:** A linear regression model ...

* ... is e.g. a polynomial of degree 0.
* ... is e.g. a polynomial of degree 8.
* ... has a closed-form solution
---
**Q:** What does a Fourier transform of a sound signal do?
 
* It decomposes the signal into its constituent frequencies.

---
**Q:** For a logistic regression classifier adequately trained on the training set, color-inverting the corresponding test set ...

* decreases the performance to random accuracy.
* decreases the performance as these kind of images were not seen during training.
---
**Q:** How many peaks are visible in a Fourier spectrum of a sine wave of 448 Hertz?

* Only one.
---
**Q:** The bias-variance trade-off is closely related to ...

* ... training and test sets.
* ... over- and underfitting.
* ... empirical risk minimization.
---
**Q:** For a logistic regression classifier adequately trained on the 
MNIST training set, horizontally flipping the corresponding test set ...

* ... decreases the performance, while still being able to distinguish some of the classes correctly.
* ... decreases the performance as these kind of images were not seen during training.
---
**Q:** For a logistic regression classifier adequately trained on the MNIST training set, color-inverting the corresponding test set ...

*  ... decreases the performance as these kind of images were not seen during training. 
*  ... decreases the performance to random accuracy.
---
**Q:** What is a hyperparameter in the k-nearest-neighbor classification algorithm?

* The number of nearest neighbors.
___

## EXAM 2


**Q:** Which of the following modules is normally not found in a fully-connected neural network:

*  A convolutional network layer.
*  A max-pooling layer.
___
**Q:** Which of the following statements is/are true about a 2 times 2 max-pooling layer in a convolutional neural network?

*  It reduces the spatial size of the representation. 
*  It takes the maximum value of 2 times 2 input values.
*  It is a form of non-linear downsampling.
---
**Q:** Dropout ... 

*  may increase the validation performance
___
**Q:** Downsampling of an input image may be achieved by ...

*   ... a 3 times 1 mean-pooling.
___
**Q:** Which of the following statements is/are true about the ReLU activation function?

*  ReLU leaves all positive values unchanged. 
*  ReLU sets all negative values to zero. 
___
**Q:** Which of the following statements is/are true about a vanishing gradient?

*  The error signal backpropagated through the network vanishes.
___
**Q:** The Sobel operator ...

*  ... has two variants, one for horizontal and one for vertical edges.
*  ... may enable easy recognition of edges in images.
*  ... is a crude approximation of the gradient of the image.

___
**Q:** A non-convex function ...

*  ... usually occurs when training neural networks.
*  ... has at least one global minimum but potentially several local minima.
___
**Q:** Which of the following statements is/are true about convolutions?

*  A convolutional layer in a neural network involves a kernel.
*  A convolution is a mathematical operation on two tensors
*  A convolutional layer is often followed by an activation function and a pooling layer.
___
**Q:** Which of the following statements is/are true about the PyTorch snippet "nn.Linear(4, 4)"?

*  It defines a linear neural network layer.
___
**Q:** Which of the following statements is/are true about the concept of "strides" in convolutional networks?

*  The stride specifies the amount of pixels by which a filter is shifted.
*  The stride influences the output size of a convolutional layer.
___
**Q:** Which of the following statements is/are true about the cross-entropy error?

*  The cross-entropy is an error measure between model predictions and the corresponding target values.
*  The cross-entropy error is a suitable loss function for classification tasks.
___
**Q:** Which of the following statements is/are true about the PyTorch snippet "nn.Conv2d(3, 2, 3)"?

*  It specifies 3 input and 2 output channels.
*  It defines a convolutional neural network layer.
___
**Q:** Which of the following statements is/are true about the mean-squared error?

*  The mean-squared error is a suitable loss function for regression tasks.
*  The mean-squared error is the mean of the squared differences between model predictions and the corresponding target values.
___
**Q:** Which of the following statements is/are true about gradient descent?

*  Gradient descent is an optimization algorithm. 
*  Gradient descent is not guaranteed to find the global minimum. 
*  Gradient descent is commonly used when training neural networks. 
*  Gradient descent takes steps in the direction of the negative gradient of the function to minimize.
___
**Q:** Which of the following statements is/are true about the PyTorch module "nn.Sequential"?

*  It may be used to group PyTorch modules in a sequential manner.
___
**Q:** Residual connections ...

*  allow to create deeper neural networks, while maintaining trainability.
*  create shortcuts for gradients.
___
**Q:** Which of the following statements is/are true about confusion matrices?

*  Confusion matrices show which classes the underlying model has confused with each other.
*  Confusion matrices ease the comparison of different classifiers. 
___
**Q:** Which of the following statements is/are true?

*  Dropout during training may reduce overfitting.
*  Data augmentation during training may reduce overfitting.
___
**Q:** The PyTorch snippet "torch.tensor([[1., -1.], [-1., 1.]])" ...


*  ... returns a tensor of size 2 times 2.
*  ... may be an appropriate input to a neural network in PyTorch.
___