Skip to content
Snippets Groups Projects
Commit 96193df4 authored by Zachary Garrett's avatar Zachary Garrett Committed by tensorflow-copybara
Browse files

Update introductory text snippet to work on newer TFF versions.

PiperOrigin-RevId: 285480902
parent 170b747a
No related branches found
No related tags found
No related merge requests found
......@@ -60,10 +60,8 @@ landing_page:
source, _ = tff.simulation.datasets.emnist.load_data()
def client_data(n):
return source.create_tf_dataset_for_client(source.client_ids[n]).map(
lambda e: {
'x': tf.reshape(e['pixels'], [-1]),
'y': e['label'],
}).repeat(10).batch(20)
lambda e: (tf.reshape(e['pixels'], [-1]), e['label'])
).repeat(10).batch(20)
# Pick a subset of client devices to participate in training.
train_data = [client_data(n) for n in range(3)]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment