请我需要帮助!写完我的 TFF 代码后,我想保存我的模型所以我在代码末尾添加了这一行
ckpt_manager = checkpoint_manager.FileCheckpointManager("model.h5")
ckpt_manager.save_checkpoint(state, round_num=1)
错误是:
TypeError: To be compatible with tf.contrib.eager.defun, Python functions must return zero or more Tensors; in compilation of <function FileCheckpointManager.save_checkpoint.<locals>.<lambda> at 0x7f06b40de730>, found return value of type <class 'tensorflow_federated.python.common_libs.anonymous_tuple.AnonymousTuple'>, which is not a Tensor.