I implement the code of TFF of image classification. TFF version 0.18.0, I write this :
iterative_process = tff.learning.build_federated_averaging_process(model_fn, server_optimizer_fn=lambda: tf.keras.optimizers.SGD(learning_rate=1.0), client_optimizer_fn=lambda: tf.keras.optimizers.SGD(learning_rate=0.001))
state = iterative_process.initialize()
But I find this warning:
WARNING:tensorflow:AutoGraph could not transform <function <lambda> at 0x7fca141a6d08> and will run it as-is.
Cause: could not parse the source code of <function <lambda> at 0x7fca141a6d08>: found multiple definitions with identical signatures at the location. This error may be avoided by defining each lambda on a single line and with unique argument names.
Match 0:
(lambda : tf.keras.optimizers.SGD(learning_rate=1.0))
Match 1:
(lambda : tf.keras.optimizers.SGD(learning_rate=0.001))
To silence this warning, decorate the function with @tf.autograph.experimental.do_not_convert
So please how can I avoid this warning. Thanks