Contains materials for my talk "You don't know TensorFlow". A recording of the talk can be found here.
In this talk, I present some under-appreciated and under-used features of TensorFlow. I focus on two things: (1) handling variable-length sequences in TensorFlow and (2) XLA.
notebooks/variable_length_sequences.ipynb
: Shows how to usepadded_batch()
to handle variable-length sequences.notebooks/xla_surgery.ipynb
: Shows some explorative interactions withtf.function
withjit_compile
enabled.
Additionally, for XLA, I use this Colab Notebook to demonstrate how XLA can speed up text generation in TensorFlow by 100x.
In the interest of time, I may not be able to even scratch the surface of XLA. I suggest going through the following resources in case XLA in TensorFlow interests you:
- Official documentation
- Faster Text Generation with TensorFlow and XLA
- XLA Integration for TensorFlow Models
But I wanted to cover:
- Exporting TensorFlow SavedModels for deployment (example)
- How should you export your SavedModels for deployment?
- Model surgery
- TF Serving
- Ragged tensors
- Taking advantage of TensorRT to speedup inference (example)