Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange question, have you ever met ? #3

Closed
niuniu111 opened this issue May 26, 2018 · 1 comment
Closed

Strange question, have you ever met ? #3

niuniu111 opened this issue May 26, 2018 · 1 comment

Comments

@niuniu111
Copy link

Running this error on windows will not happen on Ubuntu:OverflowError: Python int too large to convert to C long.
def _int64_feature(value):
return tf.train.Feature(int64_list=tf.train.Int64List(value=[value]))
I want to modify the Int64 bit uint32, but tensorflow only supports Int64, float, string. What should I do?

@gvanhorn38
Copy link
Contributor

Right, by default the tfrecords can only store bytes, floats and int64 data types (see the protocol definition here). If you really need to store uint32 data types then you could:

  1. do your own conversion to and from int64
  2. store the uint32 as a byte string that you can parse later on
  3. change the definition and recompile the tfrecord protocol buffers so that they use uint32. Or just create your own protocol buffer that is more appropriate for your data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants