Skip to content

Update getting started guide to use PyTorch ResNet50#2750

Merged
tempusfrangit merged 3 commits intomainfrom
update-getting-started-pytorch
Feb 20, 2026
Merged

Update getting started guide to use PyTorch ResNet50#2750
tempusfrangit merged 3 commits intomainfrom
update-getting-started-pytorch

Conversation

@bfirsh
Copy link
Copy Markdown
Contributor

@bfirsh bfirsh commented Feb 19, 2026

Summary

  • Replace TensorFlow-based ResNet50 example with PyTorch/torchvision, which works on Apple Silicon (M1/M2) Macs
  • Use python_requirements instead of deprecated python_packages in all code examples
  • Update Python version from 3.11 to 3.12 across both getting started guides
  • Remove manual weight download step (torchvision handles this automatically)
  • Remove cog debug and --separate-weights sections to streamline the guide
  • Add a tip suggesting gpu: true for users with NVIDIA GPUs

Based on the ResNet example from https://github.com/replicate/cog-examples/tree/main/resnet

Supersedes #1880

Replace TensorFlow-based ResNet50 example with PyTorch/torchvision, which
works on Apple Silicon (M1/M2) Macs. Also updates getting-started-own-model.md
for consistency.

Changes:
- Switch from tensorflow to torch/torchvision (auto-downloads weights)
- Remove manual weight download step
- Use python_requirements instead of deprecated python_packages
- Update Python version from 3.11 to 3.12
- Remove cog debug and --separate-weights sections
- Add GPU tip for users with NVIDIA GPUs

Closes #336
Supersedes #1880
@bfirsh bfirsh requested a review from a team as a code owner February 19, 2026 18:49
@tempusfrangit tempusfrangit added this to the 0.17.0 Release milestone Feb 19, 2026
@tempusfrangit tempusfrangit merged commit 76b9a2f into main Feb 20, 2026
27 checks passed
@tempusfrangit tempusfrangit deleted the update-getting-started-pytorch branch February 20, 2026 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants