TensorFlow Eager Execution v.s. Graph (@tf.function)

Source: TensorFlow doc

Graph Mode Catches

Not to use Assert

Trace

print v.s. tf.print

AutoGraph (tf.autograph)

Dataset v.s. NumPy ndarray

Python List v.s. TensorArray

Polymorphic on Performance

Graph is a Snapshot

Iterator

Variables can be created once only

Model Training

Tensor objects & Numpy interoperability

Function-ize a function

Execute Python code in Graph

Use type annotations to reduce retracing

Thoughts

Credits & References

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store