forked from 626_privacy/tensorflow_privacy
Add dtype=tf.int32 to TensorBuffer capacity and current size.
PiperOrigin-RevId: 249908717
This commit is contained in:
parent
a06bc6c99b
commit
15c07250a1
1 changed files with 5 additions and 2 deletions
|
@ -59,9 +59,12 @@ class TensorBuffer(object):
|
||||||
name='buffer',
|
name='buffer',
|
||||||
use_resource=True)
|
use_resource=True)
|
||||||
self._current_size = tf.Variable(
|
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(
|
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):
|
def append(self, value):
|
||||||
"""Appends a new tensor to the end of the buffer.
|
"""Appends a new tensor to the end of the buffer.
|
||||||
|
|
Loading…
Reference in a new issue