Saving state for tf.function-decorated functions

By Dmitry Kabanov