Exercise

Creating tensors and accessing attributes

Tensors are the primary data structure in PyTorch and will be the building blocks for our deep learning models. They share many similarities with NumPy arrays but have some unique attributes too.

In this exercise, you'll practice creating a tensor from a Python list and displaying some of its attributes.

Instructions 1/2

50 XP
    1
    2
  • Begin by importing PyTorch.
  • Create a tensor from the Python list list_a.