assert function_outputs_list[i].shape == function_outputs_list[i + 1].shape
assert_allclose(function_outputs_list[i], function_outputs_list[i + 1], atol=1e-05)
new_val_list = []for x, k in zip(x_list, test_backend):
new_val_list.append(k.get_value(x))
for i in range(len(new_val_list) - 1):
assert new_val_list[i].shape == new_val_list[i + 1].shape
assert_allclose(new_val_list[i], new_val_list[i + 1], atol=1e-05)
After Change
function_outputs_list = [f([input_val])[0] for f in f_list]
assert_list_pairwise(function_outputs_list)
new_val_list = [k.get_value(x) for x, k in zip(x_list, test_backend)]
assert_list_pairwise(new_val_list)
def test_rnn(self):
// implement a simple RNN