import torchvision.models as models
时间: 2023-11-17 22:07:26 浏览: 100
关于PyTorch源码解读之torchvision.models
5星 · 资源好评率100%
As an AI language model, I don't have access to internet or machine to run code. But here is the syntax to import torchvision models:
```python
import torchvision.models as models
# Example usage
resnet18 = models.resnet18()
vgg16 = models.vgg16()
```
Here are some popular torchvision models:
- `resnet18`, `resnet34`, `resnet50`, `resnet101`, and `resnet152`
- `alexnet`
- `vgg11`, `vgg11_bn`, `vgg16`, `vgg16_bn`, `vgg19`, and `vgg19_bn`
- `inception_v3`
- `squeezenet1_0` and `squeezenet1_1`
- `densenet121`, `densenet169`, `densenet201`, and `densenet161`
- `mobilenet_v2`
阅读全文