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

import torch

DEPTH = 2
BATCH_SIZE = 8
SEQ_LENGTH = 8
Frank Lee's avatar
Frank Lee committed
9
IMG_SIZE = 16
zbian's avatar
zbian committed
10
HIDDEN_SIZE = 8
Frank Lee's avatar
Frank Lee committed
11
NUM_CLASSES = 10
zbian's avatar
zbian committed
12
13
14

def check_equal(A, B):
    assert torch.allclose(A, B, rtol=1e-5, atol=1e-2) == True