def setUp(self):
     self.model = GravesPredictionNet()
     self.mini_batch = 1
     self.shape = (self.mini_batch, 100)
     self.xs, self.es = parse_IAMxml("res/strokesz.xml")
     self.xs = numpy.float32(self.xs)
     self.es = numpy.float32(self.es)
예제 #2
0
 def test_parse_line_strokes(self):
     s, e = parse_IAMxml(self.file)
     eps = 1e-5
     numpy.testing.assert_allclose(numpy.mean(s, axis=0), numpy.zeros_like(s[0]), atol=eps)
     numpy.testing.assert_allclose(numpy.std(s, axis=0), numpy.ones_like(s[0]), atol=eps)