/PyTorch-Tensors-Basic-Exploration

This repository explores the basics of PyTorch tensors.

Primary LanguageJupyter NotebookMIT LicenseMIT

PyTorch Tensors basics

Overview

PyTorch, developed by Facebook (Meta), is a leading open-source deep learning framework. It provides a robust machine learning library with GPU support, making it efficient for developing deep learning models. PyTorch tensors are akin to Numpy arrays, but with built-in GPU support, offering fast and efficient computation. Tensors are multi-dimensional arrays that serve as the fundamental building blocks for various machine learning algorithms.

In this project, we delve into PyTorch and its tensor operations. We explore the essential concepts and operations related to PyTorch tensors, laying the groundwork for mastering deep learning with PyTorch.


Why PyTorch?

PyTorch is preferred for various reasons:

  • Ease of learning and coding
  • Support for computational graphs at runtime
  • A rich set of libraries and tools
  • Flexibility, speed, and optimization
  • Compatibility with both CPU and GPU
  • User-friendly debugging with Python IDEs

Applications

PyTorch is widely used in a variety of applications, including:

  • Image classification
  • Handwriting recognition
  • Text generation
  • Time sequence forecasting
  • Style transfer

Aim

The primary objectives of this project are as follows:

  • Introduce the fundamental concepts of PyTorch tensors
  • Provide an understanding of PyTorch and its tensor operations

Data Description

The dataset used in this project is related to customer churn prediction based on various features. It comprises 2000 rows and 15 features for predicting churn.


Tech Stack

  • Language: Python
  • Libraries: Pandas, PyTorch

Approach

The project follows these key steps:

  1. Creating tensors
  2. Creating tensors from the dataset
  3. Performing arithmetic and trigonometric operations
  4. Conducting statistical operations
  5. Implementing function operations
  6. Calculating gradients

Getting Started

To run this project, ensure you have the following prerequisites:

  • Python installed on your local machine
  • PyTorch library installed
  • Pandas library installed

You can execute the project code by opening the Jupyter Notebook in the Notebook folder.


Concepts covered

  1. What is PyTorch and why is it significant?
  2. Differentiating between PyTorch and TensorFlow
  3. Setting up PyTorch on a local machine
  4. Understanding tensors and multidimensional arrays
  5. Exploring tensor attributes
  6. Comparing Numpy and PyTorch tensors
  7. Creating tensors in PyTorch
  8. Generating tensors of zeros and ones
  9. Creating tensors from arrays
  10. Performing arithmetic and trigonometric operations on tensors
  11. Conducting function and statistical operations
  12. Calculating gradients in tensors
  13. Creating tensors from datasets