common.py 206 Bytes
Newer Older
Nianchen Deng's avatar
sync    
Nianchen Deng committed
1
2
3
4
5
6
7
8
9
10
import sys
import torch
import numpy as np
import matplotlib.pyplot as plt
from pathlib import Path

rootdir = Path(sys.path[0]).absolute().parents[1]
sys.path.append(str(rootdir))

torch.cuda.set_device(0)