Instructions to use zeromodels/pvt-v2-b4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use zeromodels/pvt-v2-b4 with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://zeromodels/pvt-v2-b4") - Notebooks
- Google Colab
- Kaggle
| { | |
| "library_name": "zeromodels", | |
| "zeromodels_version": "1.2.6", | |
| "model_module": "zeromodels.models.pvt_v2", | |
| "model_class": "PvtV2ImageClassify", | |
| "variant": "pvt-v2-b4", | |
| "weights": "model.weights.h5", | |
| "schema_version": 2, | |
| "model_type": "pvt_v2", | |
| "vision_config": { | |
| "hidden_sizes": [ | |
| 64, | |
| 128, | |
| 320, | |
| 512 | |
| ], | |
| "depths": [ | |
| 3, | |
| 8, | |
| 27, | |
| 3 | |
| ], | |
| "num_attention_heads": [ | |
| 1, | |
| 2, | |
| 5, | |
| 8 | |
| ], | |
| "sr_ratios": [ | |
| 8, | |
| 4, | |
| 2, | |
| 1 | |
| ], | |
| "mlp_ratios": [ | |
| 8, | |
| 8, | |
| 4, | |
| 4 | |
| ], | |
| "linear_attention": false, | |
| "image_size": 224, | |
| "num_classes": 1000 | |
| } | |
| } |