Skip to content

Commit

Permalink
Revert "性能微小优化"
Browse files Browse the repository at this point in the history
This reverts commit d8225c7
  • Loading branch information
fangwei123456 committed Sep 8, 2020
1 parent 71e8b20 commit 9cb7d40
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spikingjelly/datasets/n_mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ def read_bin(file_name: str):
raw_data = np.uint32(np.fromfile(bin_f, dtype=np.uint8))
x = raw_data[0::5]
y = raw_data[1::5]
p = (raw_data[2::5] & 128) >> 7 # bit 7
t = ((raw_data[2::5] & 127) << 16) | (raw_data[3::5] << 8) | (raw_data[4::5])
rd_2__5 = raw_data[2::5]
p = (rd_2__5 & 128) >> 7 # bit 7
t = ((rd_2__5 & 127) << 16) | (raw_data[3::5] << 8) | (raw_data[4::5])
return {'t': t, 'x': x, 'y': y, 'p': p}

@staticmethod
Expand Down

0 comments on commit 9cb7d40

Please sign in to comment.