I get the following error even though my preceding code gives the correct batch sizes for training and validation in Exercise 1: train_val_datasets. The error seems to refer to a variable in the unittest. I don’t know what to do now.
UnboundLocalError Traceback (most recent call last)
Cell In[8], line 2
1 # Test your code!
----> 2 unittests.test_train_val_datasets(train_val_datasets)
File /tf/unittests.py:168, in test_train_val_datasets(learner_func)
164 cases.append(t)
166 return cases
→ 168 cases = g()
169 print_feedback(cases)
File /tf/unittests.py:90, in test_train_val_datasets..g()
87 return [t]
89 t = test_case()
—> 90 if not isinstance(validation_text, tf.Tensor):
91 t.failed = True
92 t.msg = “Incorrect output type for validation texts”
UnboundLocalError: cannot access local variable ‘validation_text’ where it is not associated with a value