minor changes to notebooks

This commit is contained in:
franzi
2022-02-07 18:07:59 +01:00
parent 050ca7c642
commit c9244982d1
2 changed files with 7 additions and 2 deletions

View File

@@ -54,7 +54,8 @@
"source": [
"# reshape image into a matrix with RGB values for each pixel\n",
"h, w, d = img_array.shape\n",
"X = ... # TODO: reshape img_array such that X is a matrix of shape n_pixels x 3 RGB channels\n",
"X = new_X.reshape(h*w, d)\n",
"# 1 pixel = 1 data point; RGB values = features\n",
"print(X.shape)"
]
},
@@ -122,7 +123,7 @@
"outputs": [],
"source": [
"# reshape back into image format\n",
"img_new = new_X.reshape(h, w, d)\n",
"img_new = ... # TODO: reshape new_X such that img_new is a matrix of shape height x width x 3 RGB channels\n",
"print(img_new.shape)"
]
},