title: Iterating on dictionary throws TypeError: list indices must be integers or slices, not tuple
body: <p>I am trying to iterate over my <code>dictionary</code> with the following code:</p>
  
  <pre><code>num_detections = int(detection['num_detections'])
  output_dict = {key:value[0, :num_detections].numpy() 
                  for key,value in detection.items()}
  </code></pre>
  
  <p>But I get </p>
  
  <blockquote>
    <p>File "main.py", line 60, in 
            for key,value in detection.items()}</p>
    
    <p>TypeError: list indices must be integers or slices, not tuple</p>
  </blockquote>
  
  <p>When I print out <code>detection</code> it's shaped like a dictionary and <code>print(type(detection))</code> gives me <code>&lt;class 'dict'&gt;</code></p>
  
  <p>Am I misunderstanding something?</p>