Questions tagged [federated-learning]

167 questions
1
vote
0 answers

ValueError: The `input_spec` is a collections.abc.Mapping (e.g., a dict), so it must contain an entry with key `'x'`, representing the input(s)

I'm testing this tutorial with non-IID distribution for federated learning: https://www.tensorflow.org/federated/tutorials/tff_for_federated_learning_research_compression, and using tff.simulation.datasets.build_single_label_dataset() as a way to…
1
vote
1 answer

AttributeError: 'MapDataset' object has no attribute 'preprocess' in tensorflow_federated tff

I'm testing this tutorial with non-IID distribution for federated learning: https://www.tensorflow.org/federated/tutorials/tff_for_federated_learning_research_compression In this posted question TensorFlow Federated: How to tune non-IIDness in…
1
vote
0 answers

How to compute the mean of weights of multiple models?

Hi i'm a student and i'm working on a Federated Learning problem, but before doing that with the proper tools like OpenFL or Flower, I started a little experiment to try in local to train using this technique. I managed to train multiple models…
1
vote
1 answer

How the centralized server model is updated with aggregated client metrics in TensorflowFederated

I have designed the Federated Learning model with TensorFlow Federated framework. Defined the iterative process as below, iterative_process = tff.learning.build_federated_averaging_process( model_fn, client_optimizer_fn=lambda:…
1
vote
1 answer

Mismatched number of elements between type spec and value in `to_representation_for_type`. Type spec has 2 elements, value has 5

I use tensorflow fedprox to implement federated learning.(tff.learning.algorithms.build_unweighted_fed_prox) def model_fn(): keras_model = create_keras_model() return tff.learning.from_keras_model( keras_model, …
1
vote
0 answers

TFF : Modify the value of state

The state object returned by iterative_process.initialize() is typically a Python container (tuple, collections.OrderedDict, etc) that contains numpy arrays. I would like that the value of state is not random, instead it begin from loaded model. As…
Eliza
  • 584
  • 4
  • 14
1
vote
0 answers

TFF: 'trainable=True ' causes decrinsing of accuracy

I work with TFF, here is a part of my code : def create_keras_model(): baseModel = tf.keras.applications.ResNet50(include_top=False, weights=None, input_tensor=tf.keras.Input(shape=(224, 224, 3))) for layer in baseModel.layers: …
seni
  • 659
  • 1
  • 8
  • 20
1
vote
1 answer

MNIST Shard Descriptor: IndexError: list index out of range

I am working on Federated Learning experiments using Intel OpenFL. I want to distribute my dataset (MNIST) using different non-iidness scenarios. I am following their official documentation:…
CasellaJr
  • 378
  • 2
  • 11
  • 26
1
vote
1 answer

How to flatten test image dataset and create a batch of tuple of (flattened image , labels)?

I'm working in Handwritten Math's symbol Classification using Federated Learning. I have preprocessed the image from keras.preprocessing.image.ImageDataGenerator and also obtained the labels of each images. from keras.preprocessing.image import…
1
vote
1 answer

Limited number of clients used in federated learning

I just started studying federated learning and want to apply it to a certain dataset, and there are some questions that have risen up. My data is containing records of 3 categories, each of which is having 3 departments. I am planning to have 3…
Eden
  • 325
  • 3
  • 13
1
vote
1 answer

Running Out of RAM using FilePerUserClientData

I have a problem with training using tff.simulation.FilePerUserClientData - I am quickly running out of RAM after 5-6 rounds with 10 clients per round. The RAM usage is steadily increasing with each round. I tried to narrow it down and realized that…
1
vote
0 answers

TFF : change the code have no effect in changing test accuracy values

To improve this tutorial and test other things, I was pretrained the network with a centralized way in EMNIST database. Then I would like to Fine tune the pretrained network with a federated code above. So, I only added: def create_keras_model(): …
seni
  • 659
  • 1
  • 8
  • 20
1
vote
1 answer

How to change the update that the client send to the server Tensorflow Federated

I'm trying to understand how Tensorflow Federated Works, using the simple_fedavg as example. I still don't understand how to change what the client send to the server, for example. I don't want to send all the weights of the update, i want to send a…
Fanto
  • 377
  • 3
  • 14
1
vote
1 answer

Federated Averaging (fedavg) with resnet 18 that has batch_normalization makes the same prediction after first round, but in no other rounds

I was trying to implement tensorflow-federated simple fedavg with cifar10 dataset and resnet18. Also this is the pytorch implementation. Just like trainable ones, I have aggregated non-trainable parameters of batch-normalization to server and…
1
vote
1 answer

AttributeError: module 'tensorflow_privacy' has no attribute 'DPQuery'

I am new to machine learning and was trying out the "federated learning for image classification" code by Tensorflow (https://www.tensorflow.org/federated/tutorials/federated_learning_for_image_classification). I ran the code on Google Colab and did…