Questions tagged [federated-learning]
167 questions
1
vote
1 answer
Random Seed for Tensorflow federated?
I want to get reproducible results with my Tensorflow Federated code. For that I have implemented some seeds (random, numpy and tensorflow), but they aren't affecting Tensorflow Federated. The data processing steps are all reproducible, it has to be…

Stefan
- 11
- 2
1
vote
1 answer
In FL, can clients train different model architectures?
I practice on this tutorial, I would like that each client train a different architecture and different model, Is this possible?

seni
- 659
- 1
- 8
- 20
1
vote
0 answers
use tff.learning.build_federated_evaluation instead of keras_evaluate
I'm newer in TFF, I work on this tutorial. I would like to replace keras_evaluate function by predefined function of TFF : evaluation = tff.learning.build_federated_evaluation(model)
So how can I edit those lines :
def keras_evaluate(state,…

Eliza
- 584
- 4
- 14
1
vote
1 answer
MODEL_SPEC in Federated Learning (Using Tensorflow Federated Core)
I am trying to use Federated code to build my own federated learning algorithm. But I met one problem. In the official tutorial, it define the Model Spec like following:
MODEL_SPEC = collections.OrderedDict(
filter1 =…

jb4382
- 19
- 1
1
vote
1 answer
the initialize computation to construct the server state
In the federated learning context, and like this tutorial shows, initial weights of global model (at server level) are initialized randomly with : state = iterative_process.initialize(). I want to have the hand to put these initial weights by…

seni
- 659
- 1
- 8
- 20
1
vote
1 answer
The validation accuracy gets lower when the number of workers increases in Federated Learning with non-IID dataset
I use human activity recognition (HAR) dataset with 6 classes using federated learning (FL). In this case, I implement the non-IID dataset by assigning (1) each class dataset to different 6 workers, (2) two classes to 3 different workers, and (3)…

tfreak
- 123
- 9
1
vote
0 answers
Question about tff.simulation.datasets.stackoverflow.load_data(cache_dir = None)
I've been using this function to load data from stackoverflow data_set. However, one problem occurs that every time I use this function and set cache_dir to the location of the keras/dataset or the location of the cache, it still tries to download…

Hangrui Cao
- 11
- 1
1
vote
1 answer
Size mismatch in tensorflow_federated eager executor
I am following this code https://github.com/BUAA-BDA/FedShapley/tree/master/TensorflowFL and trying to run the file same_OR.py
there is a problem in import tensorflow.compat.v1 as tf its show that unable to import " tensorflow.compat.v1" File…

user12
- 761
- 8
- 24
1
vote
1 answer
RuntimeError: input.size(-1) must be equal to input_size. Expected 200, got 0 ---- PySyft / PyTorch / Federated Learning
does anyone know a solution for this Error? I am trying to switch my PyTorch network to an Federated Learning network but i always get this Error.
I'm using Google Colab an train on GPU. When I print the size of embeds I get 0, but I don't…

Tobias Koch
- 11
- 1
1
vote
0 answers
How can I solve the pytorch/pylint error: torch.tensor is not callable?
when I make in python
import syft as sy
import torch
hook = sy.TorchHook(torch)
data = torch.tensor([[1.,1],[0,1],[1,0],[0,0]])
an error came up that says: 'torch.tensor is not callable'. And I do not know how to solve it.
I have pytorch version…

Jesus M.
- 33
- 3
1
vote
1 answer
How to save Tensorflow Federated Model
How can I easily save a Tensorflow Federated model? (state)
A few months ago I was using this solution after importing ServerState and FileCheckPointManager and it worked:
# Create the checkpoint Manager
ckpt_manager =…

Fabrolly
- 51
- 1
- 4
1
vote
2 answers
How to transfer weights from baseline model to federated model?
def create_keras_model():
model = Sequential([
Conv2D(16, 3, padding='same', activation='relu'),
MaxPooling2D(),
Conv2D(32, 3, padding='same', activation='relu'),
MaxPooling2D(),
Conv2D(64, 3, padding='same', activation='relu'),
…

gokulan vikash
- 43
- 6
1
vote
1 answer
federated learning implementing
I new in python and machine learning. I tried to implement the following code for federated learning with the MNIST dataset but it doesn't work !! it tried to train a model in a distributed way in local workers. the jpeg version of the MNIST data…

man.utd_21
- 19
- 7
1
vote
1 answer
Does tensorflow-federated support dynamic batch size?
Does tensorflow-federated support assigning different batch-size for different simulated devices, and changing batch-size for different epoch?

Yuanli Wang
- 11
- 3
1
vote
1 answer
Pysyft client and server
This question is with regards to my project on federated learning using the pysyft library, but those with the knowledge of websockets can help too since pysyft uses websockets for the server and client interaction.
To start off, i have an issue…

Seph
- 21
- 3