Skip to content

Instantly share code, notes, and snippets.

@ayoubbenaissa
Created February 21, 2019 17:35
Show Gist options
  • Save ayoubbenaissa/4e2a0f301d183230da91f2b72c2d031b to your computer and use it in GitHub Desktop.
Save ayoubbenaissa/4e2a0f301d183230da91f2b72c2d031b to your computer and use it in GitHub Desktop.
PyTorch tuto
x = [i for i in range(11)] #x is a set
x_train = np.array(x, dtype=np.float32) #translate x into numpy array
x_train = x_train.reshape(-1, 1) #rasgape x_train to be an array of shape (11, 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment