Skip to content

Commit

Permalink
small fixes to documentation
Browse files Browse the repository at this point in the history
specifically for "Using models from OpenSoundscape <0.11.0"
  • Loading branch information
sammlapp committed Nov 15, 2024
1 parent 70947dc commit d196278
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/tutorials/predict_with_cnn.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1851,7 +1851,7 @@
"\n",
"2. Save the model's weights like this: \n",
"```\n",
"torch.save({'weights':model.network.state_dict(),'my_weights.pt'})\n",
"torch.save({'weights':model.network.state_dict()},'my_weights.pt')\n",
"```\n",
"\n",
"\n",
Expand All @@ -1869,7 +1869,9 @@
"\n",
"#### Changes to default preprocessing behavior across OpenSoundscape versions\n",
"Be aware of changes to default preprocessing settings between OpenSoundscape versions. In particular: \n",
"\n",
"- opensoundscape<0.7.0 used the opposite sign convention in preprocessed tensor samples: loud sounds were low values and quiet sounds were high values. Specify `model.preprocessor.pipeline.to_tensor.set(invert=True)` to match the default preprocessor behavior of opensoundscape<0.7.0\n",
"\n",
"- opensoundscape<0.11.0 used skimage interpolation by default in Spectrogram.to_tensor(which is used in the SpectrogramPreprocessor.pipeline.to_tensor action), while newer version use pytorch interpolation by default (much faster). The differences in interpolation methods are subtle but lead to slightly different ML model scores. Specify `model.preprocessor.pipeline.to_tensor.set(use_skimage=True)` to match the default preprocessor behavior of opensoundscape<0.11.0. \n",
"\n",
"If you need assistance loading a model developed in a different OpenSoundscape version into a more recent version, please contact one of the developers of OpenSoundscape. "
Expand Down

0 comments on commit d196278

Please sign in to comment.