title: how to create sub dictionaries of python dictionary
body: <p>I have following ddictionary in pytorch</p>
  <pre><code>OrderedDict([('first', tensor([[[ 0.4713, -0.6487]],
      [[-0.2126,  0.0831]],
      [[ 0.6851,  0.2049]],
      [[-0.3450,  0.5549]],
      [[-0.5363,  0.3424]],
      [[-0.3450,  0.5549]]]))
  </code></pre>
  <p>I want to create this into two or multiple dictionaries. how can i do this ?</p>
  <pre><code>dictionary 1 = [ 0.4713, -0.6487]], [[-0.2126,  0.0831]],[[ 0.6851, 
   0.2049]]
  
  dictionary 2 =   [[-0.3450,  0.5549]], [[-0.5363,  0.3424]],
  [[-0.3450,  0.5549]]
  </code></pre>
  <p>I tried this imple code but dont know how to do this one with tensor</p>
  <pre><code>import numpy as np
  
  dic = {
    &quot;A&quot;: [0.2822, -0.0958, -0.5165, -0.3812,
          -0.3469,  0.4025, -0.0696, -0.1246,
          -0.1132,  0.4170, -0.0383, -0.4071,
          -0.5407,  0.1519,  0.5630,  0.1276],
    &quot;B&quot;: [1.0014, 0.9980, 1.0012, 0.9986,
         1.0001, 0.9999, 1.0016, 1.0014,
         1.0008, 0.9996, 1.0008, 1.0004,
         1.0000, 0.9987, 0.9997, 0.9989]
  }
  
  # We give array_split() our list, and how many we want it split into.
  a1, a2 = np.array_split(dic['A'], 2) # We get our two lists returned.
  dic['A1'] = a1.tolist() # Numpy returns it as an np.array, so let's put it back into a list.
  dic['A2'] = a2.tolist()
  del(dic['A']) # Remove the now unused key-value.
  </code></pre>