noanabeshima commited on
Commit
3813785
·
verified ·
1 Parent(s): 39d11a9

Update readme to reflect that values are no longer stored in uint8

Browse files
Files changed (1) hide show
  1. README.md +2 -1
README.md CHANGED
@@ -18,7 +18,8 @@ def load_feat_acts(fname, only_active_docs=False):
18
  # Convert them back before constructing the matrix.
19
  csr_kwargs['crow_indices'] = csr_kwargs['crow_indices'].int()
20
  csr_kwargs['col_indices'] = csr_kwargs['col_indices'].int()
21
- csr_kwargs['values'] = (csr_kwargs['values'].float()/255)
 
22
 
23
  feat_acts = torch.sparse_csr_tensor(**csr_kwargs)
24
  return feat_acts
 
18
  # Convert them back before constructing the matrix.
19
  csr_kwargs['crow_indices'] = csr_kwargs['crow_indices'].int()
20
  csr_kwargs['col_indices'] = csr_kwargs['col_indices'].int()
21
+ values = csr_kwargs['values'].float()
22
+ csr_kwargs['values'] = values/values.max()
23
 
24
  feat_acts = torch.sparse_csr_tensor(**csr_kwargs)
25
  return feat_acts