Add dtype=tf.int32 to TensorBuffer capacity and current size.

PiperOrigin-RevId: 249908717
This commit is contained in:
Steve Chien 2019-05-24 15:22:19 -07:00 committed by A. Unique TensorFlower
parent a06bc6c99b
commit 15c07250a1

View file

@ -59,9 +59,12 @@ class TensorBuffer(object):
name='buffer',
use_resource=True)
self._current_size = tf.Variable(
initial_value=0, trainable=False, name='current_size')
initial_value=0, dtype=tf.int32, trainable=False, name='current_size')
self._capacity = tf.Variable(
initial_value=capacity, trainable=False, name='capacity')
initial_value=capacity,
dtype=tf.int32,
trainable=False,
name='capacity')
def append(self, value):
"""Appends a new tensor to the end of the buffer.