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

import torch

アマデウス's avatar
アマデウス committed
6
DEPTH = 4
zbian's avatar
zbian committed
7
8
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
アマデウス's avatar
アマデウス committed
11
NUM_CLASSES = 8
12
VOCAB_SIZE = 16
zbian's avatar
zbian committed
13
14

def check_equal(A, B):
アマデウス's avatar
アマデウス committed
15
    assert torch.allclose(A, B, rtol=1e-3, atol=1e-1) == True