When creating a post, please add:
C3W1_Assignment
Last Checkpoint: 13/12/2023
#UNIT TESTS
w1_unittest.test_test_model(log_perplexity)
Description: Error in the test_case, one of the test case is injecting invalid test case value into the dimension into Preds sequence as a result target sequence is corrupted.
Example below:
Preds Shape: (2, 1, 7, 3) Targets shape:(2, 7) (2, 7, 3)
Log Shape: (2, 2, 7), non_pad Shape (2, 7)
Expected Press Sequence: (2,7,3),
Error preds Sequence; (2,1,7,3)
Preds Shape: (1, 5, 3) Targets shape:(1, 5) (1, 5, 3)
Log Shape: (1, 5), non_pad Shape (1, 5)
Preds Shape: (1, 5, 3) Targets shape:(1, 5) (1, 5, 3)
Log Shape: (1, 5), non_pad Shape (1, 5)
Preds Shape: (1, 5, 3) Targets shape:(1, 5) (1, 5, 3)
Log Shape: (1, 5), non_pad Shape (1, 5)
Preds Shape: (1, 5, 3) Targets shape:(1, 5) (1, 5, 3)
Log Shape: (1, 5), non_pad Shape (1, 5)
Preds Shape: (1, 8, 5) Targets shape:(1, 8) (1, 8, 5)
Log Shape: (1, 8), non_pad Shape (1, 8)
Preds Shape: (1, 8, 5) Targets shape:(1, 8) (1, 8, 5)
Log Shape: (1, 8), non_pad Shape (1, 8)
Preds Shape: (1, 8, 5) Targets shape:(1, 8) (1, 8, 5)
Log Shape: (1, 8), non_pad Shape (1, 8)
Preds Shape: (1, 7, 3) Targets shape:(1, 7) (1, 7, 3)
Log Shape: (1, 7), non_pad Shape (1, 7)
Preds Shape: (2, 1, 7, 3) Targets shape:(2, 7) (2, 7, 3)
Log Shape: (2, 2, 7), non_pad Shape (2, 7)
ValueError Traceback (most recent call last)
Cell In[144], line 2
1 #UNIT TESTS
(1, 7, 3) 3
Preds Shape: (1, 7, 3) Targets shape:(1, 7) (1, 7, 3)
Log Shape: (1, 7), non_pad Shape (1, 7)
(2, 1, 7, 3) 3
Preds Shape: (2, 1, 7, 3) Targets shape:(2, 7) (2, 7, 3)
Log Shape: (2, 2, 7), non_pad Shape (2, 7)