Use OrderedDict in simulations.ipynb
Fixes a failed assertion in the example:
TypeError: Unsupported mapping type dict.
Use collections.OrderedDict for mappings.
"source, _ = tff.simulation.datasets.emnist.load_data()\n",
"\n",
"def map_fn(example):\n",
- " return {'x': tf.reshape(example['pixels'], [-1]), 'y': example['label']}\n",
+ " return collections.OrderedDict([\n",
+ " ('x', tf.reshape(example['pixels'], [-1])),\n",
+ " ('y', example['label'])\n",
+ " ])\n",
"\n",
"def client_data(n):\n",
" ds = source.create_tf_dataset_for_client(source.client_ids[n])\n",
