tensorflow-federated

How to create federated dataset from a CSV file?

廉价感情. 提交于 2020-08-07 21:06:25
问题 I have selected this dataset: https://www.kaggle.com/karangadiya/fifa19 Now, I would like to convert this CSV file into the federated dataset to fit in the model. Tensorflow provided tutorials on federated learning where they have used a pre-defined dataset. However, my question is How can I use this particular dataset for a federated learning scenario? 回答1: I'll use a different CSV dataset, but this should still address the core of this question, which is how to create a federated dataset

How to create federated dataset from a CSV file?

若如初见. 提交于 2020-08-07 21:02:06
问题 I have selected this dataset: https://www.kaggle.com/karangadiya/fifa19 Now, I would like to convert this CSV file into the federated dataset to fit in the model. Tensorflow provided tutorials on federated learning where they have used a pre-defined dataset. However, my question is How can I use this particular dataset for a federated learning scenario? 回答1: I'll use a different CSV dataset, but this should still address the core of this question, which is how to create a federated dataset

'Error While Encoding with Hub.KerasLayer' while using TFF

依然范特西╮ 提交于 2020-07-23 06:53:05
问题 An error is being generated while training a federated model that uses hub.KerasLayer. The details of error and stack trace is given below. The complete code is available of gist https://gist.github.com/aksingh2411/60796ee58c88e0c3f074c8909b17b5a1. Help and suggestion in this regard would be appreciated. Thanks. from tensorflow import keras def create_keras_model(): encoder = hub.load("https://tfhub.dev/google/tf2-preview/gnews-swivel-20dim/1") return tf.keras.models.Sequential([ hub

'Error While Encoding with Hub.KerasLayer' while using TFF

牧云@^-^@ 提交于 2020-07-23 06:52:04
问题 An error is being generated while training a federated model that uses hub.KerasLayer. The details of error and stack trace is given below. The complete code is available of gist https://gist.github.com/aksingh2411/60796ee58c88e0c3f074c8909b17b5a1. Help and suggestion in this regard would be appreciated. Thanks. from tensorflow import keras def create_keras_model(): encoder = hub.load("https://tfhub.dev/google/tf2-preview/gnews-swivel-20dim/1") return tf.keras.models.Sequential([ hub

'Error While Encoding with Hub.KerasLayer' while using TFF

依然范特西╮ 提交于 2020-07-23 06:51:24
问题 An error is being generated while training a federated model that uses hub.KerasLayer. The details of error and stack trace is given below. The complete code is available of gist https://gist.github.com/aksingh2411/60796ee58c88e0c3f074c8909b17b5a1. Help and suggestion in this regard would be appreciated. Thanks. from tensorflow import keras def create_keras_model(): encoder = hub.load("https://tfhub.dev/google/tf2-preview/gnews-swivel-20dim/1") return tf.keras.models.Sequential([ hub

'Error While Encoding with Hub.KerasLayer' while using TFF

…衆ロ難τιáo~ 提交于 2020-07-23 06:50:55
问题 An error is being generated while training a federated model that uses hub.KerasLayer. The details of error and stack trace is given below. The complete code is available of gist https://gist.github.com/aksingh2411/60796ee58c88e0c3f074c8909b17b5a1. Help and suggestion in this regard would be appreciated. Thanks. from tensorflow import keras def create_keras_model(): encoder = hub.load("https://tfhub.dev/google/tf2-preview/gnews-swivel-20dim/1") return tf.keras.models.Sequential([ hub

TFF loading a pre-trained Keras model

独自空忆成欢 提交于 2020-07-09 14:26:46
问题 My goal is to load a base model from a .hdf5 file (it's a Keras model), and continue to train it with federated learning. Here is how I initialize the base model for FL: def model_fn(): model = tf.keras.load_model(path/to/model.hdf5) return tff.learning.from_keras_model(model=model, dummy_batch=db, loss=loss, metrics=metrics) trainer = tff.learning.build_federated_averaging_process(model_fn) state = trainer.initialize() However, it seems like the resulting state.model weights are randomly

TFF loading a pre-trained Keras model

亡梦爱人 提交于 2020-07-09 14:25:23
问题 My goal is to load a base model from a .hdf5 file (it's a Keras model), and continue to train it with federated learning. Here is how I initialize the base model for FL: def model_fn(): model = tf.keras.load_model(path/to/model.hdf5) return tff.learning.from_keras_model(model=model, dummy_batch=db, loss=loss, metrics=metrics) trainer = tff.learning.build_federated_averaging_process(model_fn) state = trainer.initialize() However, it seems like the resulting state.model weights are randomly