def load_model(device, model_path, use_half): model = DeepSpeech.load_model(hydra.utils.to_absolute_path(model_path)) model.eval() model = model.to(device) if use_half: model = model.half() return model
def load_model(device, model_path, use_half): model = DeepSpeech.load_model(model_path) model.eval() model = model.to(device) if use_half: model = model.half() return model