Created
March 30, 2020 18:56
-
-
Save piEsposito/0b4bb4f4b524d80bf1293441e622dada to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
X, y = load_boston(return_X_y=True) | |
X = StandardScaler().fit_transform(X) | |
y = StandardScaler().fit_transform(np.expand_dims(y, -1)) | |
X_train, X_test, y_train, y_test = train_test_split(X, | |
y, | |
test_size=.25, | |
random_state=42) | |
X_train, y_train = torch.tensor(X_train).float(), torch.tensor(y_train).float() | |
X_test, y_test = torch.tensor(X_test).float(), torch.tensor(y_test).float() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment