Skip to content

Commit

Permalink
Delete unuse files
Browse files Browse the repository at this point in the history
  • Loading branch information
Soohwan Kim authored and Soohwan Kim committed Jun 5, 2021
1 parent 6ae26ae commit d2d7b14
Showing 1 changed file with 1 addition and 32 deletions.
33 changes: 1 addition & 32 deletions kospeech/decode/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,11 @@
from kospeech.models.model import EncoderDecoderModel, EncoderModel
from kospeech.models.transformer.decoder import TransformerDecoder
from kospeech.utils import logger
from kospeech.models import DecoderRNN
from kospeech.metrics import (
CharacterErrorRate,
WordErrorRate
)
from kospeech.models import (
DeepSpeech2,
ListenAttendSpell,
SpeechTransformer,
Jasper,
Conformer, DecoderRNN,
)


class GreedySearch(object):
Expand All @@ -54,31 +48,6 @@ def search(self, model: nn.Module, queue: Queue, device: str, print_every: int)

if isinstance(model, nn.DataParallel):
model = model.module
if isinstance(model, ListenAttendSpell):
architecture = 'las'
elif isinstance(model, SpeechTransformer):
architecture = 'transformer'
elif isinstance(model, DeepSpeech2):
architecture = 'deepspeech2'
elif isinstance(model, Jasper):
architecture = 'jasper'
elif isinstance(model, Conformer):
architecture = 'conformer'
else:
raise ValueError("Unsupported model : {0}".format(type(model)))
else:
if isinstance(model, ListenAttendSpell):
architecture = 'las'
elif isinstance(model, SpeechTransformer):
architecture = 'transformer'
elif isinstance(model, DeepSpeech2):
architecture = 'deepspeech2'
elif isinstance(model, Jasper):
architecture = 'jasper'
elif isinstance(model, Conformer):
architecture = 'conformer'
else:
raise ValueError("Unsupported model : {0}".format(type(model)))

model.eval()
model.to(device)
Expand Down

0 comments on commit d2d7b14

Please sign in to comment.