File /tf/unittests.py:215, in test_n_gram_seqs..g()
212 t.got = f"Size is: {len(learner_output)}"
213 cases.append(t)
→ 215 learner_set = set([frozenset(list(x.numpy())) for x in learner_output])
216 expected_set = set([frozenset(list(x.numpy())) for x in t_case[“expected”]])
218 t = test_case()
File /tf/unittests.py:215, in (.0)
212 t.got = f"Size is: {len(learner_output)}"
213 cases.append(t)
→ 215 learner_set = set([frozenset(list(x.numpy())) for x in learner_output])
216 expected_set = set([frozenset(list(x.numpy())) for x in t_case[“expected”]])
218 t = test_case()
AttributeError: ‘numpy.ndarray’ object has no attribute ‘numpy’
It’s also very helpful if you post your question in the forum for the course you are attending. This will help the mentors for that course find your question quickly.
The “AI Discussions” area isn’t monitored strongly by the course staff.
which specialisation, course and week’s assignment is your query from.
to get more successful solution response whenever you are creating topic, make sure
You have a proper header to your query or issue.
If your query is from any particular course, you need to use the right category(you can refer faq section and search how to choose category, you will know how to do this)
Brief description about which week assignment, assignment’s name, which section/exercise you have issue and rather than copy pasting the error, take. screenshot of the complete error or your output with expected output.
Lastly do not post any grade function codes as it assess your assignment grades and is against community guidelines.
Now comes to your error, that error is being thrown because you are not suppose to use numpy function when you create the sequence list of line using vectorizer function. Other parts of your codes seems correct.
Please use the edit option next to your header topic name, to move your query to the right course.