Skip to content

Commit 69ed222

Browse files
winston6JoelMarcey
authored andcommitted
decrease train time and small typo fix (pytorch#301)
1 parent 32b6b2b commit 69ed222

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

beginner_source/audio_classifier_tutorial.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def forward(self, x):
220220
#
221221

222222
optimizer = optim.Adam(model.parameters(), lr = 0.01, weight_decay = 0.0001)
223-
scheduler = optim.lr_scheduler.StepLR(optimizer, step_size = 30, gamma = 0.1)
223+
scheduler = optim.lr_scheduler.StepLR(optimizer, step_size = 20, gamma = 0.1)
224224

225225

226226
######################################################################
@@ -281,7 +281,7 @@ def test(model, epoch):
281281
#
282282

283283
log_interval = 20
284-
for epoch in range(1, 61):
284+
for epoch in range(1, 41):
285285
if epoch == 31:
286286
print("First round of training complete. Setting learn rate to 0.001.")
287287
scheduler.step()
@@ -302,6 +302,6 @@ def test(model, epoch):
302302
# For more advanced audio applications, such as speech recognition,
303303
# recurrent neural networks (RNNs) are commonly used. There are also other
304304
# data preprocessing methods, such as finding the mel frequency cepstral
305-
# coefficients (MCFF), that can reduce the size of the dataset.
305+
# coefficients (MFCC), that can reduce the size of the dataset.
306306
#
307307

0 commit comments

Comments
 (0)