Skip to content

Commit

Permalink
Store features as float16 instead of float64
Browse files Browse the repository at this point in the history
  • Loading branch information
woctezuma committed Jan 31, 2021
1 parent 7045723 commit 728dc16
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions build_feature_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,19 @@ def build_feature_index(

if (counter % 1000) == 0:
print("{}/{} in {:.2f} s".format(counter, num_games, time() - start))
np.save(feature_filename, Y_hat)

np.save(feature_filename, Y_hat)
np.save(
feature_filename,
np.asarray(Y_hat, dtype=np.float16),
allow_pickle=False,
fix_imports=False,
)

np.save(
feature_filename,
np.asarray(Y_hat, dtype=np.float16),
allow_pickle=False,
fix_imports=False,
)

return

Expand Down

0 comments on commit 728dc16

Please sign in to comment.