Questions tagged [federated-learning]

167 questions
2
votes
0 answers

Keras - how to set weights to some layers

I want to set weights to an existing model, such as VGG 16. However, I only want to set weights to the model excluding the last (fully connected) layer. I have tried to use model.layers[:-1].set_weights(weights[:-1]), it will cause the error of File…
kegemo
  • 106
  • 1
  • 7
2
votes
0 answers

TFF: finetune with pretrained network : Test accuracy still constant after all rounds

I would like to Fine-tune the pre-trained model with Federated Learning, So I do this: def create_keras_model(): baseModel = tf.keras.models.load_model(path\to\model) headModel = baseModel.output model_output =…
seni
  • 659
  • 1
  • 8
  • 20
2
votes
1 answer

Local Model performance in Tensorflow Federated

I am implementing federated learning through tensorflow-federated. The tutorial and all other material available compared the accuracy of the federated (global) model after each communication round. Is there a way I can compute the accuracy of each…
2
votes
1 answer

What does intial_clip_norm mean in gaussian adaptive clipping in TFF?

I am trying to implement a Differentially private FL binary classification model using gaussian adaptive clipping geometric method. aggregation_factory = tff.aggregators.DifferentiallyPrivateFactory.gaussian_adaptive( …
2
votes
1 answer

Norm clipping technique in TFF

I'm training a DP federated learning model using the "DP-FedAvg" algorithm, which is based on below paper: Learning Differentially Private Recurrent Language Models The paper proposes two norm clipping techniques "flat clipping" and "per-layer…
ABHS
  • 151
  • 1
  • 7
2
votes
1 answer

WARNING:tensorflow:AutoGraph could not transform at 0x7fca141a6d08> and will run it as-is

I implement the code of TFF of image classification. TFF version 0.18.0, I write this : iterative_process = tff.learning.build_federated_averaging_process(model_fn, server_optimizer_fn=lambda: tf.keras.optimizers.SGD(learning_rate=1.0),…
seni
  • 659
  • 1
  • 8
  • 20
2
votes
1 answer

What state = iterative_process.initialize() dow in Federated learning

I'm new in Federated learning, I tried to implement the code of FL for image classification, but I can't understand this line : state = iterative_process.initialize() , Weights affected to the server from where ?
seni
  • 659
  • 1
  • 8
  • 20
2
votes
1 answer

Federated Learning in Tensorflow Federated, is there any way to apply Early stopping on the client side?

I am using Tensorflow Federated to train a text classification model with the federated learning approach. Is there any way to apply Early Stopping on the client-side? Is there an option for cross-validation in the API? The only thing I was able to…
p20
  • 41
  • 3
2
votes
1 answer

How to build federated_averaging_process from custom federated dataset that loads from CSV file

My problem is a continue to this question How to create federated dataset from a CSV file? i manage to load a federated dataset from a given csv file and load both the train and the test data. My question now is how to reproduce a working example to…
2
votes
1 answer

Expected a TensorFlow computation, found intrinsic

I am following this code https://github.com/BUAA-BDA/FedShapley/tree/master/TensorflowFL and trying to run the file same_OR.py with some required changes from __future__ import absolute_import, division, print_function import tensorflow_federated as…
2
votes
0 answers

Why Resnet50 with TFF does not give good results

I use TFF 0.12.0 and image dataset for dog and cat(2 labels), If I test with VGG16, Ifind accuracy 0.9 but If I change to ResNet50, accuracy decrease to 0.4, Here is what I write: def create_compiled_keras_model(): baseModel =…
seni
  • 659
  • 1
  • 8
  • 20
2
votes
1 answer

'tensorflow_federated' has no attribute 'NamedTupleType

I am following this code https://github.com/BUAA-BDA/FedShapley/tree/master/TensorflowFL and trying to run the file same_OR.py I also place input file "initial_model_parameters.txt" and data folder "MNIST_data" in same folder from __future__ import…
2
votes
0 answers

PySyft Worker overfitting

I try to train a image classification (cifar10) with pysyft. My trainsetup has 10 workers where every worker gets betwen 800 and 1200 images of the dataset. My Problem is that after about 250-300 epochs, the train loss is at about 0.005 and the…
2
votes
1 answer

Grid Search Applicable for TFF and FL.?

I'm currently researching with TFF and image classification (Federated Learning for Image Classification) emnist. I'm looking at hyper parameters for the model learning rate and optimizer. Is grid search a good approach here ? . In a real world…
2
votes
1 answer

Federated learning : convert my own image dataset into tff simulation Clientdata

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…
1
2
3
11 12