Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. from tensorflow.core.example import example_pb2
  2. tf_example = example_pb2.Example()
  3. tf_example.features.feature['article'].bytes_list.value.extend(['test test testing'])
  4.  
  5. ---------------------------------------------------------------------------
  6. TypeError Traceback (most recent call last)
  7. <ipython-input-1-7fc29de54f13> in <module>()
  8. 1 from tensorflow.core.example import example_pb2
  9. 2 tf_example = example_pb2.Example()
  10. ----> 3 tf_example.features.feature['article'].bytes_list.value.extend(['test test testing'])
  11.  
  12. TypeError: 'test test testing' has type str, but expected one of: bytes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement