common.py 252 Bytes
Newer Older
zbian's avatar
zbian committed
1
2
3
4
5
6
7
8
9
#!/usr/bin/env python
# -*- encoding: utf-8 -*-

import torch

DEPTH = 2
BATCH_SIZE = 512
SEQ_LENGTH = 128
HIDDEN_SIZE = 512
Frank Lee's avatar
Frank Lee committed
10
NUM_CLASSES = 1000
zbian's avatar
zbian committed
11
NUM_BLOCKS = 6
Frank Lee's avatar
Frank Lee committed
12
IMG_SIZE = 224
zbian's avatar
zbian committed
13
14

def check_equal(A, B):
Frank Lee's avatar
Frank Lee committed
15
    return torch.allclose(A, B, rtol=1e-4, atol=1e-2)