3 years ago

### Assignment Instructions (delete this cell before submission)

The objective of this assignment is to develop a solid understanding of PyTorch tensors. In this assignment you will:

1. Pick 5 interesting functions related to PyTorch tensors by reading the documentation,

2. Edit this starter template notebook to illustrate their usage and publish your notebook to Jovian using `jovian.commit`. Make sure to add proper explanations too, not just code.

4. (Optional) Write a blog post on Medium to accompany and showcase your Jupyter notebook. Embed cells from your notebook wherever necessary.

5. (Optional) Share your work with the community and exchange feedback with other participants

The recommended way to run this notebook is to click the "Run" button at the top of this page, and select "Run on Colab". Run `jovian.commit` regularly to save your progress.

Try to give your notebook an interesting title e.g. "All about PyTorch tensor operations", "5 PyTorch functions you didn't know you needed", "A beginner's guide to Autograd in PyToch", "Interesting ways to create PyTorch tensors", "Trigonometic functions in PyTorch", "How to use PyTorch tensors for Linear Algebra" etc.

IMPORTANT NOTE: Make sure to submit a Jovian notebook link e.g. https://jovian.ai/aakashns/01-tensor-operations . Colab links will not be accepted.

Remove this cell containing instructions before making a submission or sharing your notebook, to make it more presentable.

## PyTorch Creation Ops

This is an introduction of PyTorch Fucntions that are used to create Tensors

• torch.eye()
• torch.arange()
• torch.logspace()
• torch.heavside()
• torch.empty_strided()
• torch.polar()
• torch.complex()

Before we begin, let's install and import PyTorch

``````# Uncomment and run the appropriate command for your operating system, if required

# Linux / Binder
``````# Import torch and other required modules