A version of the Temporal Fusion Transformer in TF2 that is lightweight, utilizes Keras layers, and ultimately readable and modifiable.

This version uses the Functional Keras API to allow for single input/output interfaces that support multi-inputs/outputs. This need arises from TFT having inputs/outputs of varied shapes, which as of today can only be implemented via the Function API.

The goal of this project is to make the TFT code both readable in its TF2 implementation and extendable/modifiable. The original implementation, found here, along with other versions on the net did not conform to TF2/Keras style and used “excessive” code. This resulted in work that required extensive effort to proofread or tweak.

The code was tested on TF-2.11

Get Involved

Go to Project

Share this Project