Learn practical skills, build real-world projects, and advance your career
Updated 4 years ago
import os
import pickle
import h5py
from pathlib import Path
from datetime import datetime
from copy import deepcopy
import numpy as np
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torchvision as tv
import torchvision.transforms as tvTransforms
from torch.utils.data import DataLoader
%matplotlib inline
pytorchHome = Path.home() / ".pytorch"
dsRoot = pytorchHome / "datasets"
modelDir = Path("pytorchBnnStartCheckpoints")
modelDir.mkdir(exist_ok=True)
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
If you have neptune and want to enable logging
Make sure the NEPTUNE_API_TOKEN
env variable is set
import neptune