Instructions to use mccaly/test2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mccaly/test2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="mccaly/test2")# Load model directly from transformers import AutoImageProcessor, UperNetForSemanticSegmentation processor = AutoImageProcessor.from_pretrained("mccaly/test2") model = UperNetForSemanticSegmentation.from_pretrained("mccaly/test2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| from mmseg.models.utils import make_divisible | |
| def test_make_divisible(): | |
| # test with min_value = None | |
| assert make_divisible(10, 4) == 12 | |
| assert make_divisible(9, 4) == 12 | |
| assert make_divisible(1, 4) == 4 | |
| # test with min_value = 8 | |
| assert make_divisible(10, 4, 8) == 12 | |
| assert make_divisible(9, 4, 8) == 12 | |
| assert make_divisible(1, 4, 8) == 8 | |