---
source_file: "Pembelajaran Mesin Mendalam - UAS - 2023 - REG.pdf"
source_type: "scanned PDF (2 pages, image-only — no embedded text layer)"
transcription_method: "page rasterization (pypdfium2) + visual reading"
course: "Pembelajaran Mesin Mendalam (Deep Learning)"
exam: "Ujian Akhir Semester (UAS) — Final Exam"
term: "Semester Gasal (Odd) 2023/2024"
program: "Program Studi S1 Ilmu Komputer"
faculty: "Fakultas Matematika dan Ilmu Pengetahuan Alam (FMIPA)"
university: "Universitas Gadjah Mada (UGM)"
class: "KOM A dan KOM B"
date: "Senin, 11 Desember 2023 (Monday, 11 December 2023)"
duration: "100 menit (100 minutes)"
lecturer: "Yunita Sari, Ph.D."
exam_type: "Open Book (Laptop/Gadget tidak diperbolehkan)"
total_marks: "25%"
pages: 2
topics: [batch-normalization, dropout, hyperparameter-tuning, CNN, tensorflow-keras, parameter-counting, attention, encoder-decoder, transformer, parallelization]
---

# UAS Pembelajaran Mesin Mendalam — 2023/2024 (KOM A & KOM B)

> **Header (as printed):**
> UJIAN AKHIR SEMESTER GANJIL TAHUN AKADEMIK 2023/2024
> PROGRAM STUDI S1 ILMU KOMPUTER
> FAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM
> UNIVERSITAS GADJAH MADA

| Field | Value |
|---|---|
| Mata Kuliah | Pembelajaran Mesin Mendalam |
| Kelas | KOM A dan KOM B |
| Hari, tanggal | Senin, 11 Desember 2023 |
| Waktu | 100 menit |
| Dosen | Yunita Sari, Ph.D |
| Sifat ujian | Open Book (Laptop/Gadget tidak diperbolehkan) |
| Total marks | 25% |

---

## CO3 — Mampu memahami proses komputasi dari algoritma pembelajaran DNN seperti batch normalization, layer dan block, hyperparameter intialisation

### 1. Jawab pertanyaan berikut dengan singkat dan jelas (score: 4%)

- Jelaskan mengapa Batch Normalisation diperlukan?
- Jelaskan bagaimana cara menentukan dropout rate?

---

## CO4 — Mampu memahami arsitektur DNN termasuk di dalamnya CNN dan RNN/GRU/LSTM

### 2. Perhatikan snippet kode keras tensorflow berikut ini (score: 6%)

```python
model = models.Sequential()
model.add(layers.Conv2D(32, (3, 3), activation='relu', input_shape=(32, 32, 3)))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Conv2D(64, (3, 3), activation='relu'))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Conv2D(64, (3, 3), activation='relu'))
model.add(layers.Flatten())
model.add(layers.Dense(64, activation='relu'))
model.add(layers.Dense(10))
```

*Note: in the printed original the code lines wrap; they have been reflowed here for readability. The code itself is transcribed verbatim.*

Model CNN di atas, akan menghasilkan summary sebagai berikut

```text
Model: "sequential"
_________________________________________________________________
 Layer (type)                 Output Shape
=================================================================
 conv2d (Conv2D)              (None, 30, 30, 32)

 max_pooling2d (MaxPooling2D) (None, 15, 15, 32)

 conv2d_1 (Conv2D)            (None, 13, 13, 64)

 max_pooling2d_1 (MaxPooling2D) (None, 6, 6, 64)

 conv2d_2 (Conv2D)            (None, 4, 4, 64)

 flatten (Flatten)            (None, 1024)

 dense (Dense)                (None, 64)

 dense_1 (Dense)              (None, 10)
=================================================================
```

| Layer (type) | Output Shape |
|---|---|
| conv2d (Conv2D) | (None, 30, 30, 32) |
| max_pooling2d (MaxPooling2D) | (None, 15, 15, 32) |
| conv2d_1 (Conv2D) | (None, 13, 13, 64) |
| max_pooling2d_1 (MaxPooling2D) | (None, 6, 6, 64) |
| conv2d_2 (Conv2D) | (None, 4, 4, 64) |
| flatten (Flatten) | (None, 1024) |
| dense (Dense) | (None, 64) |
| dense_1 (Dense) | (None, 10) |

*(Page 1 footer: "Halaman 1 dari 2")*

---

### Page 2

- Hitung, berapa jumlah parameter pada setiap layer (note: jangan lupa untuk menghitung parameter bias)
- Hitung total parameter pada model CNN di atas

---

## CO4 — Mampu memahami arsitektur DNN termasuk di dalamnya CNN dan RNN/GRU/LSTM

### 3. Perhatikan gambar di bawah ini (score: 10%)

**Figure description (transcribed from the printed diagram):**

An encoder–decoder sequence-to-sequence model with attention, translating the French source sentence into the English output word *"pie"*.

- **Source sentence (input) — "72"**: `il` `a` `m'` `entarté` — fed into the **Encoder RNN** (a row of bidirectional RNN cells with forward/backward arrows).
- Above the encoder cells, two bracketed rows are labelled **"Attention scores"** and **"Attention distribution"**.
- An **"Attention output"** block (a vertical stack of units) sits above the encoder, with a dotted arrow pointing down to the decoder output `ŷ₄`.
- The **Decoder RNN** (labelled on the right) receives the tokens `<START>` `he` `hit` `me` `with` `a` (with a feedback loop from the previous output at each step).
- The decoder's final output is `ŷ₄` → **`pie`**.

**Questions:**

- Jelaskan bagaimana mekanisme *attention* bisa mengatasi *bottleneck problem* pada arsitektur encoder-decoder?
- Salah satu keuntungan dari mekanisme *attention* adalah *interpretability*. Jelaskan bagaimana hal tsb bisa dilakukan?

---

## CO4 — Mampu memahami arsitektur DNN termasuk di dalamnya CNN dan RNN/GRU/LSTM

### 4. Jelaskan bagaimana transformer model bisa menyelesaikan permasalahan *Linear interaction distance* dan *lack of parallelizability* pada reccurent model? (score: 5%)

---

*End of exam. Total marks: 25%.*
