|
|
|
@ -246,7 +246,6 @@ class TestDygraphPtbRnn(unittest.TestCase):
|
|
|
|
|
for i in range(batch_num):
|
|
|
|
|
x_data = np.arange(12).reshape(4, 3).astype('int64')
|
|
|
|
|
y_data = np.arange(1, 13).reshape(4, 3).astype('int64')
|
|
|
|
|
x_data = x_data.reshape((-1, num_steps, 1))
|
|
|
|
|
y_data = y_data.reshape((-1, 1))
|
|
|
|
|
init_hidden_data = np.zeros(
|
|
|
|
|
(num_layers, batch_size, hidden_size), dtype='float32')
|
|
|
|
@ -328,7 +327,6 @@ class TestDygraphPtbRnn(unittest.TestCase):
|
|
|
|
|
for i in range(batch_num):
|
|
|
|
|
x_data = np.arange(12).reshape(4, 3).astype('int64')
|
|
|
|
|
y_data = np.arange(1, 13).reshape(4, 3).astype('int64')
|
|
|
|
|
x_data = x_data.reshape((-1, num_steps, 1))
|
|
|
|
|
y_data = y_data.reshape((-1, 1))
|
|
|
|
|
init_hidden_data = np.zeros(
|
|
|
|
|
(num_layers, batch_size, hidden_size), dtype='float32')
|
|
|
|
@ -433,7 +431,6 @@ class TestDygraphPtbRnn(unittest.TestCase):
|
|
|
|
|
for i in range(batch_num):
|
|
|
|
|
x_data = np.arange(12).reshape(4, 3).astype('int64')
|
|
|
|
|
y_data = np.arange(1, 13).reshape(4, 3).astype('int64')
|
|
|
|
|
x_data = x_data.reshape((-1, num_steps, 1))
|
|
|
|
|
y_data = y_data.reshape((-1, 1))
|
|
|
|
|
init_hidden_data = np.zeros(
|
|
|
|
|
(num_layers, batch_size, hidden_size), dtype='float32')
|
|
|
|
@ -537,7 +534,6 @@ class TestDygraphPtbRnn(unittest.TestCase):
|
|
|
|
|
for i in range(batch_num):
|
|
|
|
|
x_data = np.arange(12).reshape(4, 3).astype('int64')
|
|
|
|
|
y_data = np.arange(1, 13).reshape(4, 3).astype('int64')
|
|
|
|
|
x_data = x_data.reshape((-1, num_steps, 1))
|
|
|
|
|
y_data = y_data.reshape((-1, 1))
|
|
|
|
|
init_hidden_data = np.zeros(
|
|
|
|
|
(num_layers, batch_size, hidden_size), dtype='float32')
|
|
|
|
@ -652,7 +648,6 @@ class TestDygraphPtbRnn(unittest.TestCase):
|
|
|
|
|
for i in range(1):
|
|
|
|
|
x_data = np.arange(12).reshape(4, 3).astype('int64')
|
|
|
|
|
y_data = np.arange(1, 13).reshape(4, 3).astype('int64')
|
|
|
|
|
x_data = x_data.reshape((-1, num_steps, 1))
|
|
|
|
|
y_data = y_data.reshape((-1, 1))
|
|
|
|
|
init_hidden_data = np.zeros(
|
|
|
|
|
(num_layers, batch_size, hidden_size), dtype='float32')
|
|
|
|
@ -745,7 +740,6 @@ class TestDygraphPtbRnn(unittest.TestCase):
|
|
|
|
|
for i in range(1):
|
|
|
|
|
x_data = np.arange(12).reshape(4, 3).astype('int64')
|
|
|
|
|
y_data = np.arange(1, 13).reshape(4, 3).astype('int64')
|
|
|
|
|
x_data = x_data.reshape((-1, num_steps, 1))
|
|
|
|
|
y_data = y_data.reshape((-1, 1))
|
|
|
|
|
init_hidden_data = np.zeros(
|
|
|
|
|
(num_layers, batch_size, hidden_size), dtype='float32')
|
|
|
|
@ -846,7 +840,6 @@ class TestDygraphPtbRnn(unittest.TestCase):
|
|
|
|
|
for i in range(1):
|
|
|
|
|
x_data = np.arange(12).reshape(4, 3).astype('int64')
|
|
|
|
|
y_data = np.arange(1, 13).reshape(4, 3).astype('int64')
|
|
|
|
|
x_data = x_data.reshape((-1, num_steps, 1))
|
|
|
|
|
y_data = y_data.reshape((-1, 1))
|
|
|
|
|
init_hidden_data = np.zeros(
|
|
|
|
|
(num_layers, batch_size, hidden_size), dtype='float32')
|
|
|
|
|