ranking
ranking copied to clipboard
Additional documentation of using TFR with keras API
Hi TFR team!
Really appreciating the new support for TFR with keras API, and the document here https://github.com/tensorflow/ranking/blob/master/tensorflow_ranking/examples/keras/README.md. I was wondering if there is method to use pre-trained embeddings with this API using hub? I was following the example to use feature_column with hub.embedding_column but there seem to be a disconnect as one expects string inputs and the data is in bytes since the data is in tfrecord format. You guys mentioned that we should shift away from feature_column, so I was wondering if there are examples without using the feature columns for TFR.
Thanks!
In general, this should be doable. You could:
- Use the model to estimator pipeline as in example.
- Or inherit or make your own model_builder and override the create_inputs() function with something can create inputs from feature columns as in feature.create_keras_inputs.
I guess you may need some extra efforts to make things work smoothly. It would be more convenient for us to help debug if you could share a piece of code that you use hub.embedding_column to load or serve in your current working pipeline.