Fixed typos in Audio Classification Documentation (#35263)
* Fixed typos in Audio Classification Documentation * removed space in '8000 kHZ' * Changes made as per review
This commit is contained in:
@@ -128,7 +128,7 @@ The next step is to load a Wav2Vec2 feature extractor to process the audio signa
|
|||||||
>>> feature_extractor = AutoFeatureExtractor.from_pretrained("facebook/wav2vec2-base")
|
>>> feature_extractor = AutoFeatureExtractor.from_pretrained("facebook/wav2vec2-base")
|
||||||
```
|
```
|
||||||
|
|
||||||
The MInDS-14 dataset has a sampling rate of 8000khz (you can find this information in it's [dataset card](https://huggingface.co/datasets/PolyAI/minds14)), which means you'll need to resample the dataset to 16000kHz to use the pretrained Wav2Vec2 model:
|
The MInDS-14 dataset has a sampling rate of 8kHz (you can find this information in its [dataset card](https://huggingface.co/datasets/PolyAI/minds14)), which means you'll need to resample the dataset to 16kHz to use the pretrained Wav2Vec2 model:
|
||||||
|
|
||||||
```py
|
```py
|
||||||
>>> minds = minds.cast_column("audio", Audio(sampling_rate=16_000))
|
>>> minds = minds.cast_column("audio", Audio(sampling_rate=16_000))
|
||||||
@@ -208,7 +208,7 @@ You're ready to start training your model now! Load Wav2Vec2 with [`AutoModelFor
|
|||||||
|
|
||||||
At this point, only three steps remain:
|
At this point, only three steps remain:
|
||||||
|
|
||||||
1. Define your training hyperparameters in [`TrainingArguments`]. The only required parameter is `output_dir` which specifies where to save your model. You'll push this model to the Hub by setting `push_to_hub=True` (you need to be signed in to Hugging Face to upload your model). At the end of each epoch, the [`Trainer`] will evaluate the accuracy and save the training checkpoint.
|
1. Define your training hyperparameters in [`TrainingArguments`]. The only required parameter is `output_dir`, which specifies where to save your model. You'll push this model to the Hub by setting `push_to_hub=True` (you need to be signed in to Hugging Face to upload your model). At the end of each epoch, the [`Trainer`] will evaluate the accuracy and save the training checkpoint.
|
||||||
2. Pass the training arguments to [`Trainer`] along with the model, dataset, tokenizer, data collator, and `compute_metrics` function.
|
2. Pass the training arguments to [`Trainer`] along with the model, dataset, tokenizer, data collator, and `compute_metrics` function.
|
||||||
3. Call [`~Trainer.train`] to finetune your model.
|
3. Call [`~Trainer.train`] to finetune your model.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user