Use constants in tf.zeros if the constant won't be too big.
authorSkye Wanderman-Milne <skyewm@google.com>
Thu, 5 Apr 2018 15:47:47 +0000 (08:47 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Thu, 5 Apr 2018 15:54:14 +0000 (08:54 -0700)
commit7162214b8acc23826f9b72fb6bb65fe4c4555c74
treedb0bb0dbbbfb3b82a68e22ca2a3c7ed7426ffbaa
parented439fc7a70d6acf2f8eb59253b7ac073f23221b
Use constants in tf.zeros if the constant won't be too big.

Using fill saves on GraphDef size, but can slow down models since the
total number of ops is greater (fill + shape + constant op). This
change makes us only use fill for large shapes.

PiperOrigin-RevId: 191747456
tensorflow/contrib/rnn/python/kernel_tests/rnn_cell_test.py
tensorflow/python/ops/array_ops.py