OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Determinism in federated learning, determinism in the flower library

  • Thread starter Thread starter Izabeliks S
  • Start date Start date
I

Izabeliks S

Guest
I am researching various federated learning aggregation methods. However, I cannot compare the results by randomization each time I train. Does anyone know how to apply it to the code from the article?

https://medium.com/@entrepreneurbilal10/federated-learning-95d7a6435f08

I tried to use it

Code:
SEED = 42

def set_deterministic(seed=42):
 random.seed(seed)
 e.g.random.seed(seed)
 torch.manual_seed(seed)
 torch.cuda.manual_seed(SEED) if torch.cuda.is_available() else None
 torch.cuda.manual_seed_all(seed)
 torch.backends.cudnn.deterministic = True
 torch.backends.cudnn.benchmark = False

set_deterministic()

But for FL it's not enough... there's still randomness somewhere.
<p>I am researching various federated learning aggregation methods. However, I cannot compare the results by randomization each time I train. Does anyone know how to apply it to the code from the article?</p>
<p><a href="https://medium.com/@entrepreneurbilal10/federated-learning-95d7a6435f08" rel="nofollow noreferrer">https://medium.com/@entrepreneurbilal10/federated-learning-95d7a6435f08</a></p>
<p>I tried to use it</p>
<pre><code>SEED = 42

def set_deterministic(seed=42):
random.seed(seed)
e.g.random.seed(seed)
torch.manual_seed(seed)
torch.cuda.manual_seed(SEED) if torch.cuda.is_available() else None
torch.cuda.manual_seed_all(seed)
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False

set_deterministic()

</code></pre>
<p>But for FL it's not enough... there's still randomness somewhere.</p>
 

Latest posts

M
Replies
0
Views
1
Meliodas Dragon
M
Top