google / qhbm-library

Quantum Hamiltonian-Based Models built on TensorFlow Quantum
https://qhbm-library.readthedocs.io/en/latest/
Apache License 2.0
40 stars 15 forks source link

Remove tf function decoration #79

Closed zaqqwerty closed 3 years ago

zaqqwerty commented 3 years ago

Removes tf.function decoration from library functions.

Running the test suite in main takes 48 seconds; after removal of tf.function decorators, the tests take 40 seconds. Due to issues like #71 and #78, as well as this speed discrepancy, I think it best to remove tracing for now. I think users should have the control to add tracing on top of the library for their training loops instead. We can consider adding them back once profiling tools are available #56 and we decide on things in #76.

For other references, TFP does not have decorators in the library, but does decorate tests.