here is the code of my federated learning test
from __future__ import absolute_import, division, print_function
import os
import collections
import warnings
from six.moves import range
import numpy as np
import six
import tensorflow as tf
import tensorflow_federated as tff
from tensorflow.keras.callbacks import EarlyStopping, ReduceLROnPlateau, ModelCheckpoint
import PIL
#pretrain
train_datagen1 = tf.keras.preprocessing.image.ImageDataGenerator(vertical_flip=True)
training_set1= train_datagen1.flow_from_directory('folder1/train',target_size=(200, 200), batch_size=32)
)
Now when I want to create sample_batch like the tutorial in the tensorflow federtaed for image classification
I write this line and it find this error
example_dataset = training_set1.create_tf_dataset_for_client(training_set1.client_ids[0])
the error
TypeError Traceback (most recent call last) in 1 training_set1.element_type_structure ----> 2 example_dataset = training_set1.create_tf_dataset_for_client(training_set1.client_ids[0])
TypeError: 'abstractproperty' object does not support indexing
Can you tell me how I must do to create dummy_batch in order to convert keras model into tff.learning.from_compiled_keras_model(model, dummy_batch)