test_slstm.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:chainer-deconv 作者: germanRos 项目源码 文件源码
def setUp(self):
        self.c_prev1 = numpy.random.uniform(-1,
                                            1, (3, 2, 4)).astype(self.dtype)
        self.c_prev2 = numpy.random.uniform(-1,
                                            1, (3, 2, 4)).astype(self.dtype)
        self.x1 = numpy.random.uniform(-1, 1, (3, 8, 4)).astype(self.dtype)
        self.x2 = numpy.random.uniform(-1, 1, (3, 8, 4)).astype(self.dtype)

        self.gc = numpy.random.uniform(-1, 1, (3, 2, 4)).astype(self.dtype)
        self.gh = numpy.random.uniform(-1, 1, (3, 2, 4)).astype(self.dtype)

        self.check_forward_options = {}
        self.check_backward_options = {'eps': 1e-2}
        if self.dtype == numpy.float16:
            self.check_forward_options = {'atol': 5e-4, 'rtol': 5e-3}
            self.check_backward_options = {
                'eps': 2 ** -4, 'atol': 5e-3, 'rtol': 5e-2}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号