University of California, Berkeley seal
Programming Project #3
CS180: Intro to Computer Vision and Computational Photography
University of California, Berkeley

Running the notebooks on Kaggle

If Colab runs out of GPU time or cannot provide a GPU, you can continue on Kaggle using the same student notebook. You do not need an API token, a support ZIP, or separate helper files.

Setup

  1. Create an account and verify it. Sign in to Kaggle, then check account settings for phone verification. Complete the verification requested by Kaggle before trying to enable a GPU. Kaggle's GPU verification guidance.
  2. Bring your notebook. Open the Notebook link on the Part A or Part B page. In Colab, use File → Download → Download .ipynb. If you have already started, download your own working copy so your code is preserved. Runtime files and model checkpoints are separate; they do not travel with the notebook.
  3. Import into Kaggle. Create a new notebook. In its editor, choose File → Import Notebook and upload the .ipynb file. Keep your notebook private so your solutions are not shared with other students. Import instructions.
  4. Enable a GPU and Internet. In the notebook editor (not account settings), open Settings / Session options, choose Accelerator → GPU T4 ×2 if available, and turn Internet on. If you are viewing a saved notebook, enter Edit first. The assignment uses one GPU; the two GPUs' memory is not automatically combined. Kaggle notebook settings.
  5. Run Setup, then work through the exercises in order. Setup unpacks the included support files and installs dependencies automatically. The first Part A run downloads several gigabytes of model weights; Part B downloads MNIST. Part A uses float32 throughout—do not change it to bfloat16. If setup explicitly requests a session restart after installing packages, restart once and run Setup again.
  6. Save before stopping. Save a notebook version and download your notebook with outputs, along with any images or checkpoints you need. Files are not automatically transferred back to Colab. Stop the GPU session when you finish to conserve your quota.

Check the actual runtime

Selecting a GPU in settings is not enough: confirm that the running session sees it. Setup prints the GPU name, or you can run:

import torch
print("CUDA available:", torch.cuda.is_available())
if torch.cuda.is_available():
    print("GPU:", torch.cuda.get_device_name(0))

Expect True and a GPU name such as Tesla T4. Do not start the full assignment on a CPU-only session.

Troubleshooting

← Back to the assignment