Skip to content

Commit 7cb205c

Browse files
authored
Fix linkcheck
1 parent 12961d5 commit 7cb205c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

intermediate_source/char_rnn_classification_tutorial.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def lineToTensor(line):
132132
return tensor
133133

134134
#########################
135-
# Here are some examples of how to use lineToTensor() for a single and multiple character string.
135+
# Here are some examples of how to use ``lineToTensor()`` for a single and multiple character string.
136136

137137
print (f"The letter 'a' becomes {lineToTensor('a')}") #notice that the first position in the tensor = 1
138138
print (f"The name 'Ahn' becomes {lineToTensor('Ahn')}") #notice 'A' sets the 27th index to 1
@@ -164,7 +164,7 @@ def __init__(self, data_dir):
164164
self.labels = []
165165
self.labels_tensors = []
166166

167-
#read all the txt files in the specified directory
167+
#read all the ``.txt`` files in the specified directory
168168
text_files = glob.glob(os.path.join(data_dir, '*.txt'))
169169
for filename in text_files:
170170
label = os.path.splitext(os.path.basename(filename))[0]
@@ -267,7 +267,7 @@ def label_from_output(output, output_labels):
267267
return output_labels[label_i], label_i
268268

269269
input = lineToTensor('Albert')
270-
output = rnn(input) #this is equivalent to output = rnn.forward(input)
270+
output = rnn(input) #this is equivalent to ``output = rnn.forward(input)``
271271
print(output)
272272
print(label_from_output(output, alldata.labels_uniq))
273273

0 commit comments

Comments
 (0)