Patch¶
Patches for TensorFlow.
-
class
PatchTensorFlow
[source]¶ Bases:
object
Patches for TensorFlow.
There are multiple “monkey patches”: 1) Patches the value attribute of a ResourceVariable to return the graph_element or cached_value instead of a ReadVariableOp. Not having to read the variable from memory again can provide performance increases. 2) Patches optimizers to save their type and arguments so that we can re-create them when partitioning variables. 3) Patches Keras’ Session fetcher to return AutoDist’s custom Session so that AutoDist is compatible with Keras.