Skip to content

Commit

Permalink
Added progress bar support
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanNaren committed Aug 24, 2017
1 parent 7025ec6 commit 683eabe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ torch
visdom
wget
librosa
tqdm
4 changes: 3 additions & 1 deletion test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import argparse

from torch.autograd import Variable
from tqdm import tqdm

from decoder import GreedyDecoder, BeamCTCDecoder

from data.data_loader import SpectrogramDataset, AudioDataLoader
Expand Down Expand Up @@ -46,7 +48,7 @@
test_loader = AudioDataLoader(test_dataset, batch_size=args.batch_size,
num_workers=args.num_workers)
total_cer, total_wer = 0, 0
for i, (data) in enumerate(test_loader):
for i, (data) in tqdm(enumerate(test_loader), total=len(test_loader)):
inputs, targets, input_percentages, target_sizes = data

inputs = Variable(inputs, volatile=True)
Expand Down

0 comments on commit 683eabe

Please sign in to comment.