diff options
author | 2018-09-27 13:18:33 -0700 | |
---|---|---|
committer | 2018-09-27 13:23:04 -0700 | |
commit | 4cedc8b6e738b7a188c9c091cf667bacafae44b7 (patch) | |
tree | 56de35940e5f9daedd5f39a82d2cd90cf374e4e4 /tensorflow/python/tools | |
parent | c898e63d07fc63315be98f0772736e5d7f2fb44c (diff) |
Updating the V2 variables API.
PiperOrigin-RevId: 214824023
Diffstat (limited to 'tensorflow/python/tools')
-rw-r--r-- | tensorflow/python/tools/freeze_graph_test.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/python/tools/freeze_graph_test.py b/tensorflow/python/tools/freeze_graph_test.py index e38945fabc..5dc14a6961 100644 --- a/tensorflow/python/tools/freeze_graph_test.py +++ b/tensorflow/python/tools/freeze_graph_test.py @@ -60,7 +60,7 @@ class FreezeGraphTest(test_util.TensorFlowTestCase): # We'll create an input graph that has a single variable containing 1.0, # and that then multiplies it by 2. with ops.Graph().as_default(): - variable_node = variables.Variable(1.0, name="variable_node") + variable_node = variables.VariableV1(1.0, name="variable_node") output_node = math_ops.multiply(variable_node, 2.0, name="output_node") sess = session.Session() init = variables.global_variables_initializer() @@ -138,7 +138,7 @@ class FreezeGraphTest(test_util.TensorFlowTestCase): features = parsing_ops.parse_example(examples, feature_configs) feature = features[feature_name] - variable_node = variables.Variable(1.0, name="variable_node") + variable_node = variables.VariableV1(1.0, name="variable_node") scores = math_ops.multiply(variable_node, feature, name="output_node") class_feature = array_ops.fill(array_ops.shape(feature), "class_%s" % feature_name) @@ -174,7 +174,7 @@ class FreezeGraphTest(test_util.TensorFlowTestCase): output_graph_filename = os.path.join(tmp_dir, "output_graph.pb") with ops.Graph().as_default(): - variable_node = variables.Variable(1.0, name="variable_node") + variable_node = variables.VariableV1(1.0, name="variable_node") output_node = math_ops.multiply(variable_node, 2.0, name="output_node") sess = session.Session() init = variables.global_variables_initializer() |