Exp 1 — TensorFlow & Keras basics

Record-ready template Fill placeholders with your dataset, code, outputs, plots, and viva.
AIML355 • Fundamentals of Deep Learning Lab

EXP01 — TensorFlow & Keras Basics

Record-ready template Replace placeholders with your final work (code + outputs + screenshots).
Submission checklist
Aim ✓ • Environment ✓ • Dataset ✓ • Procedure ✓ • Code ✓ • Output ✓ • Discussion ✓ • Viva ✓

1) Aim

To explore the basic features of TensorFlow and Keras packages in Python.

Learning outcomes
  • Understand tensors and basic TensorFlow operations.
  • Build a simple Keras model and run training/evaluation.
  • Interpret loss/accuracy curves and basic metrics.

2) Requirements / Environment

Software
  • Python 3.10+ (recommended)
  • TensorFlow/Keras (or PyTorch where applicable)
  • NumPy, Pandas, Matplotlib
  • Jupyter/Colab optional
Hardware
  • CPU is OK for small runs; GPU optional
  • RAM: 4–8 GB+ recommended
Reproducibility
Record library versions and random seed in your final report.

3) Dataset

  • Source: Use a relevant dataset and cite the source in your report.
  • Features/Labels: [Describe X and y; mention classes if classification]
  • Split: [Train/Validation/Test or K-fold]
  • Preprocessing: [Scaling/Normalization, resizing, tokenization, etc.]

4) Procedure / Steps

  1. Load dataset and perform preprocessing.
  2. Define model architecture and justify key choices.
  3. Compile model (loss + optimizer + metrics).
  4. Train with validation and log curves.
  5. Evaluate on test set and compute required metrics.
  6. Summarize observations and limitations.
Model hint
Design a model aligned to the problem and justify choices.

5) Code (Skeleton)

Paste your complete runnable code below (or attach notebook link in the final submission).

import tensorflow as tf
from tensorflow import keras

print('TF:', tf.__version__)
tf.keras.utils.set_random_seed(42)

# TODO: load small dataset (e.g., MNIST)
# TODO: define model
# TODO: compile + fit + evaluate

6) Results / Output

  • Metrics: [Write your final values: accuracy/F1 or MAE/MSE]
  • Plots: [Attach loss/metric curves; prediction vs actual plots if forecasting]
  • Screenshots: [Paste screenshots of outputs, confusion matrix, sample predictions]

7) Observations / Discussion

  • [Observation 1: what changed when you tuned epochs/batch size?]
  • [Observation 2: evidence of overfitting/underfitting?]
  • [Observation 3: what improved performance (augmentation, regularization, fine-tuning)?]

8) Conclusion

Write 3–6 lines summarizing what you implemented, key result, and what you learned.

9) Viva Questions

  1. What is the difference between training and validation data?
  2. Explain overfitting and two ways to reduce it.
  3. Why do we normalize/scale inputs?
  4. What does batch size and epoch mean?
  5. How do you choose a loss function for a task?

10) Post-lab Assignment

  • Train with a different optimizer (SGD) and compare learning curves.
  • Add dropout and observe change in validation metrics.
Tip: press Esc to close.