Skip to content

Commit

Permalink
Add dtype=tf.int32 to TensorBuffer capacity and current size.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 249908717
  • Loading branch information
schien1729 authored and tensorflower-gardener committed May 24, 2019
1 parent a06bc6c commit 15c0725
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions privacy/analysis/tensor_buffer.py
Expand Up @@ -59,9 +59,12 @@ def __init__(self, capacity, shape, dtype=tf.int32, name=None):
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.
Expand Down

0 comments on commit 15c0725

Please sign in to comment.