From ee512a206a3d475301b9b562db28cec9dd8d708f Mon Sep 17 00:00:00 2001 From: flozi00 Date: Wed, 29 Jun 2022 18:35:58 +0000 Subject: [PATCH] fix SpeechRecognitionOutputTransform if local (#1362) Co-authored-by: Ethan Harris --- CHANGELOG.md | 2 ++ flash/audio/speech_recognition/model.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 874996a3e9..7a41c1213b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Fixed naming of optimizer and scheduler registries which did not allow manual optimization. ([#1342](https://github.com/PyTorchLightning/lightning-flash/pull/1342)) +- Fixed a bug where the `processor_backbone` argument to `SpeechRecognition` was not used for decoding outputs ([#1362](https://github.com/PyTorchLightning/lightning-flash/pull/1362)) + ## [0.7.4] - 2022-04-27 ### Fixed diff --git a/flash/audio/speech_recognition/model.py b/flash/audio/speech_recognition/model.py index 93b6431cd7..59ca8ee808 100644 --- a/flash/audio/speech_recognition/model.py +++ b/flash/audio/speech_recognition/model.py @@ -71,7 +71,9 @@ def __init__( optimizer=optimizer, lr_scheduler=lr_scheduler, learning_rate=learning_rate, - output_transform=SpeechRecognitionOutputTransform(backbone), + output_transform=SpeechRecognitionOutputTransform(backbone) + if processor_backbone is None + else SpeechRecognitionOutputTransform(processor_backbone), ) self.save_hyperparameters()