Downloads · 30 days
6
7% of all-time downloads
anthony-wss/distilhubert-finetuned-gtzan
distilhubert-finetuned-gtzan is a audio classification model from anthony-wss. Use it for the audio classification task on the model card, and read the license before you ship it in a product. It is set up for transformers.
This repo contains code and notes for this tutorial.
Downloads · 30 days
6
7% of all-time downloads
All-time downloads
81
Public
Repo size
1.1 GB
Likes
0
Public
Click a slice to open those files.
.bin94.8 MB · 100%
From the Hugging Face model README
This repo contains code and notes for this tutorial.
GTZAN is used.
export HUGGINGFACE_TOKEN=<your_token>
python main.py
Acc: 0.81 (default setting)
🤗 Datasets support train_test_split() method to split the dataset.
feature_extractor can not handle resampling
dataset.map()from datasets import Audio
gtzan = gtzan.cast_column("audio", Audio(sampling_rate=feature_extractor.sampling_rate))
feature_extractor do the normalization and returns input_values and attention_mask.
.map() support batched preprocess.
Why AutoModelForAudioClassification.from_pretrained takes label2id and id2label?