Learn practical skills, build real-world projects, and advance your career
import jovian
jovian.commit()
[jovian] Saving notebook..
[jovian] Updating notebook "3f155d72b27a4d97adbfd7f9223310a4" on https://jvn.io [jovian] Uploading notebook.. [jovian] Capturing environment.. [jovian] Committed successfully! https://jvn.io/maxliubl/3f155d72b27a4d97adbfd7f9223310a4
import numpy as np
import pandas as pd
import torch
# make zhe data
inputes = np.array([[73,67, 43],
             [91, 88, 64],
             [87, 134, 58],
             [102, 43, 37],
             [69, 96, 70]],dtype="float32"
             )
targets = np.array([[56, 70],
             [81, 101],
             [119, 133],
             [22, 37],
             [103, 119]],dtype="float32"
                  )
inputes = torch.from_numpy(inputes)
targets = torch.from_numpy(targets)
# initialize the weight and biase
# w = np.random.randn(2,3)
# b = np.random.randn(5,2)
w = torch.randn(2,3, requires_grad=True)
b = torch.randn(2, requires_grad=True)