eaglelandsonce commited on
Commit
c0bfa85
·
verified ·
1 Parent(s): da75a25

Update pages/17_RNN.py

Browse files
Files changed (1) hide show
  1. pages/17_RNN.py +1 -1
pages/17_RNN.py CHANGED
@@ -10,7 +10,7 @@ data_size, vocab_size = len(sequence), len(chars)
10
 
11
  # Create mappings from characters to indices and vice versa
12
  char_to_idx = {ch: i for i, ch in enumerate(chars)}
13
- idx_to_char = {i, ch for i, ch in enumerate(chars)}
14
 
15
  # Convert the sequence to indices
16
  indices = np.array([char_to_idx[ch] for ch in sequence])
 
10
 
11
  # Create mappings from characters to indices and vice versa
12
  char_to_idx = {ch: i for i, ch in enumerate(chars)}
13
+ idx_to_char = {i: ch for i, ch in enumerate(chars)}
14
 
15
  # Convert the sequence to indices
16
  indices = np.array([char_to_idx[ch] for ch in sequence])