aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/ops/partitioned_variables.py
diff options
context:
space:
mode:
authorGravatar Wei Ho <weiho4+github@gmail.com>2016-05-26 11:57:06 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-05-26 13:04:13 -0700
commiteff582de8ffdc3cbbdf3716e66650bb3be4ae4bb (patch)
treef69a5e8d98961d5f5624812a0286dcce92413fa3 /tensorflow/python/ops/partitioned_variables.py
parent99671f3a705789ef217c7bca92409add3cf529e5 (diff)
Skeleton for PartitionedVariable class
Change: 123347356
Diffstat (limited to 'tensorflow/python/ops/partitioned_variables.py')
-rw-r--r--tensorflow/python/ops/partitioned_variables.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/tensorflow/python/ops/partitioned_variables.py b/tensorflow/python/ops/partitioned_variables.py
index 2971cb9ab4..bc3acf1719 100644
--- a/tensorflow/python/ops/partitioned_variables.py
+++ b/tensorflow/python/ops/partitioned_variables.py
@@ -210,20 +210,15 @@ def create_partitioned_variables(
partitioner = lambda **unused_kwargs: slicing
with variable_scope.variable_op_scope(
- [], name, "PartitionedVariable", reuse=reuse) as scope:
-
+ [], name, "PartitionedVariable", reuse=reuse):
# pylint: disable=protected-access
- vs, _ = variable_scope._get_partitioned_variable_list(
- name="part",
+ partitioned_var = variable_scope._get_partitioned_variable(
+ name=None,
shape=shape,
dtype=dtype,
initializer=initializer,
trainable=trainable,
partitioner=partitioner,
collections=collections)
-
- for var in vs:
- var._save_slice_info.full_name = scope.name
+ return partitioned_var._get_variable_list()
# pylint: enable=protected-access
-
- return vs