SHARE
TWEET

Untitled

a guest Jul 21st, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top