mirror of
https://github.com/macaodha/batdetect2.git
synced 2026-04-04 15:20:19 +02:00
Create duplicate preprocessor for data input pipeline
This commit is contained in:
parent
91806aa01e
commit
0d90cb5cc3
@ -73,9 +73,8 @@ def run_train(
|
||||
|
||||
audio_loader = audio_loader or build_audio_loader(config=audio_config)
|
||||
|
||||
if model is not None:
|
||||
preprocessor = preprocessor or model.preprocessor
|
||||
|
||||
# NOTE: Create a new preprocessor instead of using the one from the model
|
||||
# to avoid issues with device placement.
|
||||
preprocessor = preprocessor or build_preprocessor(
|
||||
input_samplerate=audio_loader.samplerate,
|
||||
config=model_config.preprocess,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user