瀏覽代碼

Update general.py (#823)

Fixes #822

`init_seeds` from `torch_utils` import is being overwritten by function `init_seeds` in `general.py`
5.0
Willie Maddox GitHub 4 年之前
父節點
當前提交
455f7b8f76
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. +3
    -2
      utils/general.py

+ 3
- 2
utils/general.py 查看文件

@@ -23,7 +23,8 @@ from scipy.cluster.vq import kmeans
from scipy.signal import butter, filtfilt
from tqdm import tqdm

from utils.torch_utils import init_seeds, is_parallel
from utils.torch_utils import init_seeds as init_torch_seeds
from utils.torch_utils import is_parallel

# Set printoptions
torch.set_printoptions(linewidth=320, precision=5, profile='long')
@@ -55,7 +56,7 @@ def set_logging(rank=-1):
def init_seeds(seed=0):
random.seed(seed)
np.random.seed(seed)
init_seeds(seed=seed)
init_torch_seeds(seed=seed)


def get_latest_run(search_dir='./runs'):

Loading…
取消
儲存