def test_check_result(self):
    (loss_1, hidden_1, cell_1) = train_static(self.place)
    (loss_2, hidden_2, cell_2) = train_dygraph(self.place)
    self.assertTrue(np.allclose(loss_1, loss_2), msg='static loss: {} \ndygraph loss: {}'.format(loss_1, loss_2))
    self.assertTrue(np.allclose(hidden_1, hidden_2), msg='static hidden: {} \ndygraph acc1: {}'.format(hidden_1, hidden_2))
    self.assertTrue(np.allclose(cell_1, cell_2), msg='static cell: {} \ndygraph cell: {}'.format(cell_1, cell_2))
def test_check_result(self):
    (loss_1, hidden_1, cell_1) = train_static(self.place)
    (loss_2, hidden_2, cell_2) = train_dygraph(self.place)
    self.assertTrue(np.allclose(loss_1, loss_2), msg='static loss: {} \ndygraph loss: {}'.format(loss_1, loss_2))
    self.assertTrue(np.allclose(hidden_1, hidden_2), msg='static hidden: {} \ndygraph acc1: {}'.format(hidden_1, hidden_2))
    self.assertTrue(np.allclose(cell_1, cell_2), msg='static cell: {} \ndygraph cell: {}'.format(cell_1, cell_2))