Skip to content

Instantly share code, notes, and snippets.

@neelindresh
Created July 18, 2022 12:13
Show Gist options
  • Save neelindresh/7218a8b0cd47027d872c5cb925defff4 to your computer and use it in GitHub Desktop.
Save neelindresh/7218a8b0cd47027d872c5cb925defff4 to your computer and use it in GitHub Desktop.
train_x,test_x,train_y,test_y=train_test_split(trainx,trainy)
train_x=torch.from_numpy(train_x.values)
train_x=train_x.type(torch.FloatTensor)
train_y=torch.from_numpy(train_y.values)
train_y=train_y.type(torch.FloatTensor)
test_x=torch.from_numpy(test_x.values)
test_x=test_x.type(torch.FloatTensor)
test_y=torch.from_numpy(test_y.values)
test_y=test_y.type(torch.FloatTensor)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment