Skip to content

Instantly share code, notes, and snippets.

@ayoubbenaissa
Created February 21, 2019 17:42
Show Gist options
  • Save ayoubbenaissa/07b56089c7e10a49cf6c5d309a6ce504 to your computer and use it in GitHub Desktop.
Save ayoubbenaissa/07b56089c7e10a49cf6c5d309a6ce504 to your computer and use it in GitHub Desktop.
pytorch
y = [2*i + 1 for i in range(11)] #y vector (y = 2x+1)
y_train = np.array(y, dtype=np.float32) #convert into numpy array
y_train = y_train.reshape(-1, 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment