Spaces:
Build error
Build error
Download models/classification_models/ResNet.py from dvtiendat/Lungs-Radiography-Analysis: direct link, hf CLI and curl.
- Browser
- Download file 225 Bytes
-
https://huggingface.co/spaces/dvtiendat/Lungs-Radiography-Analysis/resolve/main/models/classification_models/ResNet.py
- Command line
-
hf download hf://spaces/dvtiendat/Lungs-Radiography-Analysis/models/classification_models/ResNet.py
-
curl -L -o ResNet.py https://huggingface.co/spaces/dvtiendat/Lungs-Radiography-Analysis/resolve/main/models/classification_models/ResNet.py
225 Bytes
| import torch | |
| import torch.nn as nn | |
| import torchvision.models as models | |
| weights = models.ResNet50_Weights.DEFAULT | |
| resnet_model = models.resnet50(weights=weights) | |
| resnet_model.fc = nn.Linear(resnet_model.fc.in_features , 3) | |