Tensorflow C3W4 assignment for part 2

I am struggling so hard on the ‘create n_gram’ part of this assignment.

Part 1 passes the tests, and I’ve tried about 5 different ways to do the 2nd part. It always produces the expected results but when checking with unitest, I continue to get the TypeError: scalar tensor has no len()

When creating a post, please add:

  • Week # must be added in the tags option of the post.
  • Link to the classroom item you are referring to:
  • Description (include relevant info but please do not post solution code or your entire notebook):
1 Like

Do you have any idea what this error means, it means that you are trying to find a property of a list (array) but the variable you are using is a defined as a scalar!

1 Like

Dear @dbasick,

Kindly share a screenshot of the error message so I can assist you more effectively.


Keep Learning AI with DeepLearning.AI - Girijesh

1 Like