dec-pytorch icon indicating copy to clipboard operation
dec-pytorch copied to clipboard

get_int

Open guhao17 opened this issue 1 year ago • 1 comments

hi,thanks for your contribution, I wonder what function get_int() is.

guhao17 avatar Mar 13 '23 11:03 guhao17

After looking arround a bit, I found out this is the function you should use

import struct

def get_int(data):
    return struct.unpack('>I', data)[0]

It took me some trial and error. But it was easy to find out once I saw some Yann Lecunn MNIST database examples.

AlbertoAltozano avatar Mar 23 '23 17:03 AlbertoAltozano