Learn practical skills, build real-world projects, and advance your career
!conda install pytorch cpuonly -c pytorch -y
!pip install jovian --upgrade --quiet
Collecting package metadata (current_repodata.json): done Solving environment: done # All requested packages already installed.
import torch
import numpy as np
import jovian
# BASICS OF PYTORCH STARTING WITH TENSORS, TENSOR OPERATIONS AND GRADIENTS
# Create tensors.
tensor_float_1 = torch.tensor(3.)
tensor_float_2 = torch.tensor(4., requires_grad = True)
tensor_float_3 = torch.tensor(5., requires_grad = True)
tensor_float_1, tensor_float_2, tensor_float_3
(tensor(3.), tensor(4., requires_grad=True), tensor(5., requires_grad=True))