Removing dataset fetching code
parent
89cd351fe9
commit
90227672ad
|
@ -1859,21 +1859,6 @@
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"from sklearn.datasets import fetch_california_housing\n",
|
|
||||||
"from sklearn.model_selection import train_test_split\n",
|
|
||||||
"from sklearn.preprocessing import StandardScaler\n",
|
|
||||||
"\n",
|
|
||||||
"housing = fetch_california_housing()\n",
|
|
||||||
"X_train_full, X_test, y_train_full, y_test = train_test_split(\n",
|
|
||||||
" housing.data, housing.target.reshape(-1, 1), random_state=42)\n",
|
|
||||||
"X_train, X_valid, y_train, y_valid = train_test_split(\n",
|
|
||||||
" X_train_full, y_train_full, random_state=42)\n",
|
|
||||||
"\n",
|
|
||||||
"scaler = StandardScaler()\n",
|
|
||||||
"X_train_scaled = scaler.fit_transform(X_train)\n",
|
|
||||||
"X_valid_scaled = scaler.transform(X_valid)\n",
|
|
||||||
"X_test_scaled = scaler.transform(X_test)\n",
|
|
||||||
"\n",
|
|
||||||
"class MyMultiLayer(keras.layers.Layer):\n",
|
"class MyMultiLayer(keras.layers.Layer):\n",
|
||||||
" def call(self, X):\n",
|
" def call(self, X):\n",
|
||||||
" X1, X2 = X\n",
|
" X1, X2 = X\n",
|
||||||
|
|
Loading…
Reference in New Issue