{%hackmd theme-dark %} Pytorch ======= Contents -------- [ToC] *** Install Pytorch --------------- ```console pip install torch torchvision ``` ### Check if cuda is available ```python$= import torch torch.cuda.is_available() print(torch.cuda.get_device_name(0)) print('Allocated:', round(torch.cuda.memory_allocated(0)/1024**3,1), 'GB') print('Cached: ', round(torch.cuda.memory_cached(0)/1024**3,1), 'GB') ```