Audio Classification
Transformers
Safetensors
audio-spectrogram-transformer
Generated from Trainer
Eval Results (legacy)
Instructions to use captaincool21/ast-gtzan with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use captaincool21/ast-gtzan with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("audio-classification", model="captaincool21/ast-gtzan")# pip install -U transformers accelerate # Load model directly from transformers import AutoFeatureExtractor, AutoModelForAudioClassification extractor = AutoFeatureExtractor.from_pretrained("captaincool21/ast-gtzan") model = AutoModelForAudioClassification.from_pretrained("captaincool21/ast-gtzan", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from captaincool21/ast-gtzan: direct link, hf CLI and curl.
- Browser
- Download file 1.03 kB
-
https://huggingface.co/captaincool21/ast-gtzan/resolve/main/config.json
- Command line
-
hf download hf://captaincool21/ast-gtzan/config.json
-
curl -L -o config.json https://huggingface.co/captaincool21/ast-gtzan/resolve/main/config.json
1.03 kB
| { | |
| "architectures": [ | |
| "ASTForAudioClassification" | |
| ], | |
| "attention_probs_dropout_prob": 0.0, | |
| "dtype": "float32", | |
| "frequency_stride": 10, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.0, | |
| "hidden_size": 768, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1", | |
| "2": "LABEL_2", | |
| "3": "LABEL_3", | |
| "4": "LABEL_4", | |
| "5": "LABEL_5", | |
| "6": "LABEL_6", | |
| "7": "LABEL_7", | |
| "8": "LABEL_8", | |
| "9": "LABEL_9" | |
| }, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1, | |
| "LABEL_2": 2, | |
| "LABEL_3": 3, | |
| "LABEL_4": 4, | |
| "LABEL_5": 5, | |
| "LABEL_6": 6, | |
| "LABEL_7": 7, | |
| "LABEL_8": 8, | |
| "LABEL_9": 9 | |
| }, | |
| "layer_norm_eps": 1e-12, | |
| "max_length": 1024, | |
| "model_type": "audio-spectrogram-transformer", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 12, | |
| "num_mel_bins": 128, | |
| "patch_size": 16, | |
| "problem_type": "single_label_classification", | |
| "qkv_bias": true, | |
| "time_stride": 10, | |
| "transformers_version": "4.57.3" | |
| } | |