Commit ae4cfee5 authored by Uridah Sami Ahmed's avatar Uridah Sami Ahmed Committed by Soumith Chintala
Browse files

Running sanity checks on cropped parts of scipy.misc.ascent (#102)

Doing this to ensure that the image is of the size 100 x 212 which is being followed throughout the sanity checks
parent 3c55f263
...@@ -69,14 +69,14 @@ ...@@ -69,14 +69,14 @@
} }
], ],
"source": [ "source": [
"lena = scipy.misc.face()\n", "lena = scipy.misc.ascent()\n",
"plt.gray()\n", "plt.gray()\n",
"plt.imshow(lena, interpolation='nearest')\n", "plt.imshow(lena, interpolation='nearest')\n",
"lena = lena[:100, 300:]\n", "cropped_lena = lena[:100, 300:]\n",
"plt.imshow(lena, interpolation='nearest')\n", "plt.imshow(cropped_lena, interpolation='nearest')\n",
"print(lena.shape)\n", "print(cropped_lena.shape)\n",
"print(lena[90,90])\n", "print(cropped_lena[90,90])\n",
"print(lena.dtype)" "print(cropped_lena.dtype)"
] ]
}, },
{ {
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
} }
], ],
"source": [ "source": [
"img = torch.from_numpy(lena.astype(float))\n", "img = torch.from_numpy(cropped_lena.astype(float))\n",
"print(img.size())\n", "print(img.size())\n",
"print(img[90,90])\n", "print(img[90,90])\n",
"img = img.clone().view(1,100,212)\n", "img = img.clone().view(1,100,212)\n",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment