Skip to content

Commit

Permalink
Merge pull request fastai#199 from WilliamNurmi/master
Browse files Browse the repository at this point in the history
Use one byte instead of four for n-hot label bits
  • Loading branch information
jph00 authored Mar 13, 2018
2 parents c91d04b + 9a3d8d5 commit d510919
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fastai/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def copy_or_move_with_subdirs(subdir_lst, src, dst, r, move=False):
do(f, os.path.join(dst, subdir, os.path.split(f)[1]))

def n_hot(ids, c):
res = np.zeros((c,), dtype=np.float32)
res = np.zeros((c,), dtype=np.int8)
res[ids] = 1
return res

Expand Down

0 comments on commit d510919

Please sign in to comment.