在联邦学习任务中,我找到了这两种方法:
def model_fn():
keras_model = create_compiled_keras_model()
return tff.learning.from_compiled_keras_model(keras_model, sample_batch) 和
def model_fn():
keras_model = create_keras_model()
return tff.learning.from_keras_model(keras_model, sample_batch, loss=tf.keras.losses.CategoricalCrossentropy(), metrics=[tf.keras.metrics.CategoricalAccuracy()]) 我想知道哪个更好,以及它是否会影响结果(准确性,损失)?谢谢
发布于 2020-11-07 10:42:49
在v0.13.0中,tff.learning.from_compiled_keras_model不久前已经被弃用并从接口中移除。有关详细信息,请参阅this commit。
我强烈建议您更新您的TFF版本。
https://stackoverflow.com/questions/64714113
复制相似问题