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.
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.
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.
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.
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.
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
GPU option missing or greyed out: make sure you are in the notebook editor, check account verification, and check remaining GPU quota. Read any tooltip or verification prompt next to the disabled option, then refresh after completing verification.
“Torch not compiled with CUDA enabled” or CUDA is unavailable: the session is CPU-only. Recheck the accelerator setting and restart the session with a GPU. Do not try to fix hardware allocation by reinstalling PyTorch.
“Temporary failure in name resolution” or downloads fail: check that Internet is enabled and restart the session if needed. A package “not found” message following DNS errors can be a connectivity failure, not a missing package version.
GPU memory runs out: restart the session and run one notebook from the beginning to clear models left by earlier experiments. If it still fails, send course staff the traceback and GPU name.