Skip to content

Provide a way to get the calculated noise multiplier through public Keras API #26

@RamSaw

Description

@RamSaw

Feed back from a user:

"""
It seems like when i don't set a specific noise multiplier in the DP_Keras_Config and instead let the API determine one for the given epsilon budget the field in the original DP_Keras_Config object is no correctly updated.
More concretely when i do:

params = keras_api.DPKerasConfig(
                epsilon=FLAGS.epsilon,
                delta=5.1-05,
                clipping_norm=10.0,
                batch_size=1024,
                gradient_accumulation_steps=1,
                train_steps=1900,
                train_size=19601,
                seed=42,
            )
model = keras_api.make_private(model, params)

I get the following correct print statement:

"Finished calculating noise multiplier: calculated_noise_multiplier=0.4813812471830989"

But then:

print(params.noise_mutiplier)

stil yields "None".
For logging purposes it would be great to expose the DPkeras config with the updated field to the user i think :thinking_face: ...
"""

params are not updated because it is immutable object. It should probably stay so. We should provide a way to get the noise_multiplier via public api.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions