Skip to content

PyTorch Fundamentals A collection of fundamental PyTorch examples covering tensors, math operations, matrix manipulation, NumPy interoperability, random seeds, and GPU usage. This project is meant as a simple guide to explore PyTorch basics step by step with code and explanations.

License

Notifications You must be signed in to change notification settings

barkinadiguzel/Pytorch-fundamentals-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PyTorch Fundamentals πŸš€

A quick beginner-friendly guide to PyTorch basics: tensors, math operations, reshaping, NumPy interoperability, random seeds, and GPU usage.

Key Concepts

  • Scalars / Vectors / Matrices / Tensors β†’ torch.tensor()
  • Create tensors β†’ torch.rand(), torch.zeros(), torch.ones(), torch.arange()
  • Data types & devices β†’ .type(), requires_grad=True, .to(device)
  • Math operations β†’ +, -, *, /, torch.matmul()
  • Matrix operations β†’ .mm(), .T, .reshape(), .view(), torch.stack()
  • Dimension operations β†’ .squeeze(), .unsqueeze(), .permute()
  • NumPy ↔ PyTorch β†’ torch.from_numpy(), .numpy()
  • Random seeds β†’ torch.manual_seed()
  • GPU / CUDA β†’ .cuda(), torch.cuda.is_available(), .cpu()

Quick Start

pip install torch torchvision torchaudio

Feedback

For feedback or questions, contact: [email protected]

About

PyTorch Fundamentals A collection of fundamental PyTorch examples covering tensors, math operations, matrix manipulation, NumPy interoperability, random seeds, and GPU usage. This project is meant as a simple guide to explore PyTorch basics step by step with code and explanations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages