The instructions for this Fundamentals notebook are found on the Lab 1 instructions page. (In general the instructions will be within the notebook itself.)
Run the following cell to check that your environment is set up properly. If this fails:
/home/cs/344/setup-cs344.sh on a Terminal, logged off, and logged back in.base kernel (click the Select Kernel or "Python" button in the top-right corner of the notebook window). (do not install ipykernel, unless you're setting up your own system and you know what you're doing)try:
import fastai
except ImportError:
print("installing fastai...")
!pip install -Uqq fastai
import torch
from fastai.vision.all import *
if torch.cuda.is_available():
print("Found a GPU")
else:
print("No GPU.")
No GPU.
On the lab computers, the above code should find a GPU.
Anyone running locally on macOS CPU may need this code; generally you should be using the lab machines or Kaggle/Colab though:
import sys
if sys.platform == "darwin":
# https://stackoverflow.com/a/64855500/69707
import os
os.environ['OMP_NUM_THREADS'] = '1'
Add your code and Markdown cells here. Delete this cell.