title: select random images from MNIST dataset
body: <p>first of all, I must admit that I have limited experience with python and TensorFlow. I am looking for some support about the manipulation of the MNIST images imported from the TensorFlow examples.</p>
  <p>What I want to is the following:</p>
  <ol>
  <li>import the MNIST dataset from tensorflow.examples.tutorials.mnist</li>
  <li>store half randomly selected pictures from MNIST in an array such that I can manipulate it</li>
  </ol>
  <p>The code that I am writing is the following</p>
  <pre><code>import tensorflow as tf
  import numpy as np
  from tensorflow.examples.tutorials.mnist import input_data
  data = input_data.read_data_sets('data/MNIST/',one_hot=True)
  import random
  
  rndm_imgs = random.sample(data.test.images, len(data.test.images)/2)
  </code></pre>
  <p>I get the following error</p>
  <pre><code>    Traceback (most recent call last):
    File &quot;&lt;string&gt;&quot;, line 7, in &lt;module&gt;
    File &quot;/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/random.py&quot;, line 320, in sample
      raise TypeError(&quot;Population must be a sequence or set.  For dicts, use list(d).&quot;)
  TypeError: Population must be a sequence or set.  For dicts, use list(d).
  </code></pre>
  <p>Anyone who can support?</p>
  <p>Thanks in advance</p>