Fix china/flower order bug
parent
1106244cfe
commit
049df7240a
|
@ -124,9 +124,9 @@
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"from sklearn.datasets import load_sample_images\n",
|
"from sklearn.datasets import load_sample_image\n",
|
||||||
"dataset = load_sample_images()\n",
|
"china = load_sample_image(\"china.jpg\")\n",
|
||||||
"china, flower = dataset.images\n",
|
"flower = load_sample_image(\"flower.jpg\")\n",
|
||||||
"image = china[150:220, 130:250]\n",
|
"image = china[150:220, 130:250]\n",
|
||||||
"height, width, channels = image.shape\n",
|
"height, width, channels = image.shape\n",
|
||||||
"image_grayscale = image.mean(axis=2).astype(np.float32)\n",
|
"image_grayscale = image.mean(axis=2).astype(np.float32)\n",
|
||||||
|
@ -232,8 +232,7 @@
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"from sklearn.datasets import load_sample_images\n",
|
"dataset = np.array([china, flower], dtype=np.float32)\n",
|
||||||
"dataset = np.array(load_sample_images().images, dtype=np.float32)\n",
|
|
||||||
"batch_size, height, width, channels = dataset.shape\n",
|
"batch_size, height, width, channels = dataset.shape\n",
|
||||||
"\n",
|
"\n",
|
||||||
"filters = np.zeros(shape=(7, 7, channels, 2), dtype=np.float32)\n",
|
"filters = np.zeros(shape=(7, 7, channels, 2), dtype=np.float32)\n",
|
||||||
|
@ -261,7 +260,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 12,
|
"execution_count": 13,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"collapsed": false
|
"collapsed": false
|
||||||
},
|
},
|
||||||
|
@ -283,7 +282,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 13,
|
"execution_count": 14,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"collapsed": false
|
"collapsed": false
|
||||||
},
|
},
|
||||||
|
@ -307,7 +306,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 14,
|
"execution_count": 15,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"collapsed": false
|
"collapsed": false
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue