Instructions to use mjun0812/resnext101d_32x4d with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- timm
How to use mjun0812/resnext101d_32x4d with timm:
import timm model = timm.create_model("hf_hub:mjun0812/resnext101d_32x4d", pretrained=True) - Transformers
How to use mjun0812/resnext101d_32x4d with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="mjun0812/resnext101d_32x4d") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mjun0812/resnext101d_32x4d", dtype="auto") - Notebooks
- Google Colab
- Kaggle
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("mjun0812/resnext101d_32x4d", dtype="auto")Quick Links
Model card for resnext101d_32x4d
This repo is provided with ResNeXt101d_32x4d trained by timm.
Usage
model = timm.create_model("hf_hub:mjun0812/resnext101d_32x4d", pretrained=True)
Detail
ImageNet-1K results
| top1 | top5 |
|---|---|
| 80.9695 | 95.1044 |
config
@register_model
def resnext101d_32x4d(pretrained: bool = False, **kwargs) -> ResNet:
"""Constructs a ResNeXt101d 32x4d model."""
model_args = dict(
block=Bottleneck,
layers=(3, 4, 23, 3),
cardinality=32,
base_width=4,
stem_width=32,
stem_type="deep",
avg_down=True,
)
return _create_resnet("resnext101d_32x4d", pretrained, **dict(model_args, **kwargs))
training command
torchrun train.py \
--data-dir ~/workspace/dataset/ImageNet --model resnext101d_32x4d --lr 0.6 --warmup-epochs 5 --epochs 240 \
--weight-decay 1e-4 --sched cosine --reprob 0.4 --recount 3 --remode pixel --aa rand-m7-mstd0.5-inc1 -b 256 -j 6 --amp --dist-bn reduce
- Downloads last month
- 2
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="mjun0812/resnext101d_32x4d") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")