Questions tagged [federated-learning]

167 questions
0
votes
1 answer

Resolved: Model parameters not loading when simulating a federated learning Semantic Segmentation task using Flower and Pytorch

I'm working on federating a UNET semantic segmentation workflow using flower and Pytorch. As of right now I can load the data and run a centralized training but once I try to federate it I see that model parameters are not being loaded properly. I…
0
votes
0 answers

Tensorflow federated prediction after the model is trained

I am new to Tensorflow federated and have trained a tff model. I want to use this model to predict on unseen data. Google colab has been used for this. I tried using the trainer object but it says 'AttributeError: 'LearningProcess' object has no…
0
votes
1 answer

How do I solve the error which I get during training the clients in flower framework for federated learning?

I am trying to implement Federated Learning using Flower framework in python. I get the following error when I start the process.Snapshot of the error Here is what I tried, NUM_CLIENTS = 10 #function to load data def load_datasets(num_clients: int,…
0
votes
0 answers

How to load data and pass it to clients in flower federated learning?

I am trying to use Flower for federated learning with data that has both inputs and outputs. However, I am having trouble figuring out how to load this data into Flower so that it can be used in the training process. I am little confused with…
0
votes
0 answers

Using MapReduce for Federated Learning

I would like to build a federated learning system with PyTorch. I've currently worked out and written the code for the following: Finetuning models on client devices Sending back the finetuned models to a master server that saves them to a storage…
Aditya Srivastava
  • 417
  • 1
  • 6
  • 12
0
votes
1 answer

Federated Learning implementation code shows a RuntimeError: all elements of input should be between 0 and 1

` import torch import torch.nn as nn import torch.optim as optim from torch.utils.data import DataLoader, Dataset import numpy as np from sklearn.datasets import load_breast_cancer from sklearn.model_selection import train_test_split # Define the…
0
votes
1 answer

Federated learning with Differential Privacy - Bad test performance

I've been playing for some time with FL + DP for my thesis. I am using TFF in case someone is wondering. I load my data as: train_data = tff.simulation.datasets.ClientData.from_clients_and_fn( client_ids=train_data_paths, …
0
votes
0 answers

How to solve model_fn invalid syntax?

I got error while compiling the code: I don't know where I am getting issues. model_fn: Union[Callable[[], tff.learning.Model], tff.learning.models.FunctionalModel] ^ SyntaxError: invalid syntax from keras import optimizers from…
0
votes
0 answers

openfl: How to send two separated data to two different collaborators?

I am new in federated learning and openfl. I have two separated (let's call them private) datasets and I want to send them to each collaborators separately. When I review tutorials, it seems that FederatedDataSet gets all the data together and split…
Amin Kaveh
  • 117
  • 6
0
votes
0 answers

How can I set the weights of a tflite model loaded into an interpreter with signatures?

I am currently working on an implementation of an federated learning with the flower library in an embedded system. I am using a tensorflow lite model because of the limited hardware. For my project I need to be able to load model weights from a…
0
votes
0 answers

Tensorflow federated Issue with CSV dataset

I ran the first 2 blocks of codes without any issue, I am trying to use my own dataset (network attacks similar to KDD) in a federated setup using Tensoflow_federated: your text`csv_url = "/home/jupyter/tff.csv" `your text`df =…
0
votes
0 answers

Preprocess a dataset for federated learning error TypeError: object.__new__() takes exactly one argument (the type to instantiate)

I have a csv dataset which I want to split in 5 parts to distribute it to 5 clients that I have in a federated learning scenario. Here is my code: train = train.iloc[:, 1:] train = train.fillna(0) train = train.rename(columns=lambda x:…
Unicorn
  • 37
  • 8
0
votes
0 answers

When running tensorflow-federated v.0.20.0 I get the error "tensorflow-federated.python.learning.models" has no attribute ModelWeights

I tried running the tensorflow-federated tutorial on "Federated Learning for Text Generation" but keep getting AttributeErrors on tff.learning.models. I wonder if this is because I have an outdated version of tensorflow-federated 0.20.0. The…
0
votes
2 answers

Is there a way to upload a deep learning model to a PostgreSQL database?

I have deep learning models (tensorflow in hdf5 format), which I want to upload to a PostgreSQL database. A single model may be up to 500 MBs, and the models need to be updated and uploaded/downloaded from the database frequently (e.g., once every…
0
votes
0 answers

split dataset in non-iid

I want to split my dataset into a non-iid way. can anyone help me? is there any python solution ? I write the code below but don't know how I split in non-iid. DNA_openml = openml.datasets.get_dataset(40670) Xy, _, _, _ =…
Mastour Ikhlass
  • 99
  • 1
  • 1
  • 7