Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Federated Learning with Python

You're reading from   Federated Learning with Python Design and implement a federated learning system and develop applications using existing frameworks

Arrow left icon
Product type Paperback
Published in Oct 2022
Publisher Packt
ISBN-13 9781803247106
Length 326 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Authors (2):
Arrow left icon
George Jeno George Jeno
Author Profile Icon George Jeno
George Jeno
Kiyoshi Nakayama, PhD Kiyoshi Nakayama, PhD
Author Profile Icon Kiyoshi Nakayama, PhD
Kiyoshi Nakayama, PhD
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Part 1 Federated Learning – Conceptual Foundations
2. Chapter 1: Challenges in Big Data and Traditional AI FREE CHAPTER 3. Chapter 2: What Is Federated Learning? 4. Chapter 3: Workings of the Federated Learning System 5. Part 2 The Design and Implementation of the Federated Learning System
6. Chapter 4: Federated Learning Server Implementation with Python 7. Chapter 5: Federated Learning Client-Side Implementation 8. Chapter 6: Running the Federated Learning System and Analyzing the Results 9. Chapter 7: Model Aggregation 10. Part 3 Moving Toward the Production of Federated Learning Applications
11. Chapter 8: Introducing Existing Federated Learning Frameworks 12. Chapter 9: Case Studies with Key Use Cases of Federated Learning Applications 13. Chapter 10: Future Trends and Developments 14. Index 15. Other Books You May Enjoy Appendix: Exploring Internal Libraries

An example of integrating image classification 
into an FL system

We learned about how to initiate an FL process with a minimal example. In this section, we will give a brief example of FL with image classification (IC) using a CNN.

First, the package that contains the image classification example code is found in the examples/image_classification/ folder in the GitHub repository at https://github.com/tie-set/simple-fl, as shown in Figure 5.3:

Figure 5.3 – The image classification package

The main code in charge of integrating the IC algorithms into the FL systems is found in the classification_engine.py file.

When importing the libraries, we use a couple of extra files that include CNN models, converter functions, and data managers related to IC algorithms. The details are provided in the GitHub code at https://github.com/tie-set/simple-fl.

Next, let’s import some standard ML libraries as well as client libraries from the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image