Beispiel #1
0
 def test_seq2idx_params(self):
     b = seq2idx(invocsize=self.numchars, outvocsize=self.numwords, innerdim=self.innerdim)
     data = np.random.randint(0, self.numchars, (self.batsize, self.seqlen))
     p = b.predict(data)
     allparams = b.output.allparams
     for param in allparams:
         print param
Beispiel #2
0
 def test_seq2idx_shape(self):
     b = seq2idx(invocsize=self.numchars,
                 outvocsize=self.numwords,
                 innerdim=self.innerdim)
     data = np.random.randint(0, self.numchars, (self.batsize, self.seqlen))
     p = b.predict(data)
     self.assertEqual(p.shape, (self.batsize, self.numwords))
Beispiel #3
0
 def test_seq2idx_params(self):
     b = seq2idx(invocsize=self.numchars,
                 outvocsize=self.numwords,
                 innerdim=self.innerdim)
     data = np.random.randint(0, self.numchars, (self.batsize, self.seqlen))
     p = b.predict(data)
     allparams = b.output.allparams
     for param in allparams:
         print param
Beispiel #4
0
 def test_seq2idx_shape(self):
     b = seq2idx(invocsize=self.numchars, outvocsize=self.numwords, innerdim=self.innerdim)
     data = np.random.randint(0, self.numchars, (self.batsize, self.seqlen))
     p = b.predict(data)
     self.assertEqual(p.shape, (self.batsize, self.numwords))