Skip to content

Commit bcf9562

Browse files
committed
Fix the rbm example via delete unnecessary decode on str Object in mla/datasets/base.py line 54
1 parent 4558cd3 commit bcf9562

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mla/datasets/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def load(dataset="training", digits=np.arange(10)):
5151

5252

5353
def load_nietzsche():
54-
text = open(get_filename("data/nietzsche.txt")).read().decode("utf-8").lower()
54+
text = open(get_filename("data/nietzsche.txt")).read().lower() # str Object has already been decoded
5555
chars = set(list(text))
5656
char_indices = {ch: i for i, ch in enumerate(chars)}
5757
indices_char = {i: ch for i, ch in enumerate(chars)}

0 commit comments

Comments
 (0)