diff options
author | Alexandre Passos <apassos@google.com> | 2018-09-27 13:18:33 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-09-27 13:23:04 -0700 |
commit | 4cedc8b6e738b7a188c9c091cf667bacafae44b7 (patch) | |
tree | 56de35940e5f9daedd5f39a82d2cd90cf374e4e4 /tensorflow/contrib/metrics | |
parent | c898e63d07fc63315be98f0772736e5d7f2fb44c (diff) |
Updating the V2 variables API.
PiperOrigin-RevId: 214824023
Diffstat (limited to 'tensorflow/contrib/metrics')
-rw-r--r-- | tensorflow/contrib/metrics/python/ops/metric_ops_test.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/tensorflow/contrib/metrics/python/ops/metric_ops_test.py b/tensorflow/contrib/metrics/python/ops/metric_ops_test.py index 955b83b44d..fc64f343ab 100644 --- a/tensorflow/contrib/metrics/python/ops/metric_ops_test.py +++ b/tensorflow/contrib/metrics/python/ops/metric_ops_test.py @@ -2069,11 +2069,11 @@ class StreamingDynamicAUCTest(test.TestCase): num_batches = 100 labels = np.array([]) predictions = np.array([]) - tf_labels = variables.Variable( + tf_labels = variables.VariableV1( array_ops.ones(batch_size, dtypes_lib.int32), collections=[ops.GraphKeys.LOCAL_VARIABLES], dtype=dtypes_lib.int32) - tf_predictions = variables.Variable( + tf_predictions = variables.VariableV1( array_ops.ones(batch_size), collections=[ops.GraphKeys.LOCAL_VARIABLES], dtype=dtypes_lib.float32) @@ -2133,15 +2133,15 @@ class StreamingDynamicAUCTest(test.TestCase): labels = np.array([]) predictions = np.array([]) weights = np.array([]) - tf_labels = variables.Variable( + tf_labels = variables.VariableV1( array_ops.ones(batch_size, dtypes_lib.int32), collections=[ops.GraphKeys.LOCAL_VARIABLES], dtype=dtypes_lib.int32) - tf_predictions = variables.Variable( + tf_predictions = variables.VariableV1( array_ops.ones(batch_size), collections=[ops.GraphKeys.LOCAL_VARIABLES], dtype=dtypes_lib.float32) - tf_weights = variables.Variable( + tf_weights = variables.VariableV1( array_ops.ones(batch_size), collections=[ops.GraphKeys.LOCAL_VARIABLES], dtype=dtypes_lib.float32) @@ -2311,10 +2311,11 @@ class AucWithConfidenceIntervalsTest(test.TestCase): num_batches = 100 labels = np.array([]) predictions = np.array([]) - tf_labels = variables.Variable(array_ops.ones(batch_size, dtypes_lib.int32), - collections=[ops.GraphKeys.LOCAL_VARIABLES], - dtype=dtypes_lib.int32) - tf_predictions = variables.Variable( + tf_labels = variables.VariableV1( + array_ops.ones(batch_size, dtypes_lib.int32), + collections=[ops.GraphKeys.LOCAL_VARIABLES], + dtype=dtypes_lib.int32) + tf_predictions = variables.VariableV1( array_ops.ones(batch_size), collections=[ops.GraphKeys.LOCAL_VARIABLES], dtype=dtypes_lib.float32) |