Move the tf.autograph.to_graph annotation just before using the _scan_step_fn.
Move the tf.autograph.to_graph annotation just before using the _scan_step_fn.

Intended to fix this -
https://travis-ci.org/tensorflow/tensor2tensor/jobs/587720856

I can't figure out why this became a problem suddenly.

PiperOrigin-RevId: 272570396

tensorflow/tensor2tensor,tensorflow/tensor2tensor,tensorflow/tensor2tensor,tensorflow/tensor2tensor,tensorflow/tensor2tensor