---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-109-e94605171995> in <module>()
1 word_embeddings = tf.get_variable("word_embeddings",
----> 2 [5, 3])
/Users/shouzeluo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.pyc in get_variable(name, shape, dtype, initializer, regularizer, trainable, collections, caching_device, partitioner, validate_shape, use_resource, custom_getter)
1063 collections=collections, caching_device=caching_device,
1064 partitioner=partitioner, validate_shape=validate_shape,
-> 1065 use_resource=use_resource, custom_getter=custom_getter)
1066 get_variable_or_local_docstring = (
1067 """%s
/Users/shouzeluo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.pyc in get_variable(self, var_store, name, shape, dtype, initializer, regularizer, reuse, trainable, collections, caching_device, partitioner, validate_shape, use_resource, custom_getter)
960 collections=collections, caching_device=caching_device,
961 partitioner=partitioner, validate_shape=validate_shape,
--> 962 use_resource=use_resource, custom_getter=custom_getter)
963
964 def _get_partitioned_variable(self,
/Users/shouzeluo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.pyc in get_variable(self, name, shape, dtype, initializer, regularizer, reuse, trainable, collections, caching_device, partitioner, validate_shape, use_resource, custom_getter)
365 reuse=reuse, trainable=trainable, collections=collections,
366 caching_device=caching_device, partitioner=partitioner,
--> 367 validate_shape=validate_shape, use_resource=use_resource)
368
369 def _get_partitioned_variable(
/Users/shouzeluo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.pyc in _true_getter(name, shape, dtype, initializer, regularizer, reuse, trainable, collections, caching_device, partitioner, validate_shape, use_resource)
350 trainable=trainable, collections=collections,
351 caching_device=caching_device, validate_shape=validate_shape,
--> 352 use_resource=use_resource)
353
354 if custom_getter is not None:
/Users/shouzeluo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.pyc in _get_single_variable(self, name, shape, dtype, initializer, regularizer, partition_info, reuse, trainable, collections, caching_device, validate_shape, use_resource)
723 caching_device=caching_device,
724 dtype=variable_dtype,
--> 725 validate_shape=validate_shape)
726 self._vars[name] = v
727 logging.vlog(1, "Created variable %s with shape %s and init %s", v.name,
/Users/shouzeluo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/tensorflow/python/ops/variables.pyc in __init__(self, initial_value, trainable, collections, validate_shape, caching_device, name, variable_def, dtype, expected_shape, import_scope)
197 name=name,
198 dtype=dtype,
--> 199 expected_shape=expected_shape)
200
201 def __repr__(self):
/Users/shouzeluo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/tensorflow/python/ops/variables.pyc in _init_from_args(self, initial_value, trainable, collections, validate_shape, caching_device, name, dtype, expected_shape)
275 with ops.name_scope("Initializer"), ops.device(None):
276 self._initial_value = ops.convert_to_tensor(
--> 277 initial_value(), name="initial_value", dtype=dtype)
278 shape = (self._initial_value.get_shape()
279 if validate_shape else tensor_shape.unknown_shape())
/Users/shouzeluo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.pyc in <lambda>()
699 initializer = initializer(dtype=dtype)
700 init_val = lambda: initializer( # pylint: disable=g-long-lambda
--> 701 shape.as_list(), dtype=dtype, partition_info=partition_info)
702 variable_dtype = dtype.base_dtype
703
/Users/shouzeluo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/tensorflow/python/ops/init_ops.pyc in __call__(self, shape, dtype, partition_info)
439 limit = math.sqrt(3.0 * scale)
440 return random_ops.random_uniform(shape, -limit, limit,
--> 441 dtype, seed=self.seed)
442
443 def get_config(self):
/Users/shouzeluo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/tensorflow/python/ops/random_ops.pyc in random_uniform(shape, minval, maxval, dtype, seed, name)
229 maxval = 1
230 with ops.name_scope(name, "random_uniform", [shape, minval, maxval]) as name:
--> 231 shape = _ShapeTensor(shape)
232 minval = ops.convert_to_tensor(minval, dtype=dtype, name="min")
233 maxval = ops.convert_to_tensor(maxval, dtype=dtype, name="max")
/Users/shouzeluo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/tensorflow/python/ops/random_ops.pyc in _ShapeTensor(shape)
40 else:
41 dtype = None
---> 42 return ops.convert_to_tensor(shape, dtype=dtype, name="shape")
43
44
/Users/shouzeluo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/tensorflow/python/framework/ops.pyc in convert_to_tensor(value, dtype, name, preferred_dtype)
609 name=name,
610 preferred_dtype=preferred_dtype,
--> 611 as_ref=False)
612
613
/Users/shouzeluo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/tensorflow/python/framework/ops.pyc in internal_convert_to_tensor(value, dtype, name, as_ref, preferred_dtype)
674
675 if ret is None:
--> 676 ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
677
678 if ret is NotImplemented:
/Users/shouzeluo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.pyc in _constant_tensor_conversion_function(v, dtype, name, as_ref)
119 as_ref=False):
120 _ = as_ref
--> 121 return constant(v, dtype=dtype, name=name)
122
123
/Users/shouzeluo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.pyc in constant(value, dtype, shape, name, verify_shape)
104 const_tensor = g.create_op(
105 "Const", [], [dtype_value.type],
--> 106 attrs={"value": tensor_value, "dtype": dtype_value}, name=name).outputs[0]
107 return const_tensor
108
/Users/shouzeluo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/tensorflow/python/framework/ops.pyc in create_op(self, op_type, inputs, dtypes, input_types, name, attrs, op_def, compute_shapes, compute_device)
2580
2581 """
-> 2582 self._check_not_finalized()
2583 for idx, a in enumerate(inputs):
2584 if not isinstance(a, Tensor):
/Users/shouzeluo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/tensorflow/python/framework/ops.pyc in _check_not_finalized(self)
2288 """
2289 if self._finalized:
-> 2290 raise RuntimeError("Graph is finalized and cannot be modified.")
2291
2292 def _add_op(self, op):
RuntimeError: Graph is finalized and cannot be modified.