Grokking-Deep-Learning icon indicating copy to clipboard operation
Grokking-Deep-Learning copied to clipboard

Chapter 15, section "Secure Aggregation" -- extra deepcopy?

Open alexvoronov opened this issue 4 years ago • 0 comments

It looks like in Chapter 15, section "Secure Aggregation", there is a deepcopy made of the model both in receiving function train_and_encrypt and by the caller:

def train_and_encrypt(model, input, target, pubkey):
    new_model = train(copy.deepcopy(model), input, target, iterations=1)

Caller:

bob_encrypted_model = train_and_encrypt(copy.deepcopy(model), 
                                            bob[0], bob[1], public_key)

No big deal, but I thought I will mention it anyway.

alexvoronov avatar Nov 29 '19 12:11 alexvoronov