when process mnist dataset
m=b'\x00\x00\x08\x03'
can‘t decode directly which make int(m.decode(),16)wrong.
or int(m,16)
n=base64.b16encode(m) #b'00000803'
int(n,16) #2051
if you want to add ‘\x’
base64.b16encode(n) #b'\x00\x00\x08\x03'
when process mnist dataset
m=b'\x00\x00\x08\x03'
can‘t decode directly which make int(m.decode(),16)wrong.
or int(m,16)
n=base64.b16encode(m) #b'00000803'
int(n,16) #2051
if you want to add ‘\x’
base64.b16encode(n) #b'\x00\x00\x08\x03'