Hello, DP
Despite several attempts to debug and adjust my implementation, I’m still facing an AssertionError
when running the provided unit test.
Here’s the specific error message I’m getting:
AssertionError Traceback (most recent call last)
Cell In[32], line 2
1 # UNIT TEST
----> 2 w1_unittest.test_create_batch_dataset(create_batch_dataset)
File /tf/w1_unittest.py:67, in test_create_batch_dataset(target)
62 expected_in_line = [[28, 20, 23, 17, 9, 0, 0, 1],
63 [30, 31, 0, 0, 10, 17, 17, 20]]
64 expected_out_line = [[20, 23, 17, 9, 0, 0, 1, 0],
65 [31, 0, 0, 10, 17, 17, 20, 0]]
---> 67 assert tf.math.reduce_all(tf.equal(in_line, expected_in_line)), \
68 f"Wrong values. Expected {expected_in_line} but got: {in_line.numpy()}"
69 assert tf.math.reduce_all(tf.equal(out_line, expected_out_line)), \
70 f"Wrong values. Expected {expected_out_line} but got: {out_line.numpy()}"
72 BATCH_SIZE = 4
AssertionError: Wrong values. Expected [[28, 20, 23, 17, 9, 0, 0, 1], [30, 31, 0, 0, 10, 17, 17, 20]] but got: [[27 19 22 16 8 0 0 0]
[29 30 0 0 9 16 16 19]]
The issue seems to arise from the output of the create_batch_dataset
function not matching the expected output in terms of the sequences generated. I have reviewed the vocabulary indexing, ensured proper sequence generation, and set the shuffle buffer size to 10,000 as specified. However, the problem persists.
Thanks.