CLN: put back imports on the top

This commit is contained in:
Yan Facai (颜发才) 2017-08-26 06:24:28 +08:00 committed by Martin Wicke
parent 075b437439
commit 200dc87de3

View File

@ -18,6 +18,7 @@ from __future__ import division
from __future__ import print_function
from tensorflow.core.framework import tensor_shape_pb2
from tensorflow.python.util import compat
class Dimension(object):
@ -25,8 +26,6 @@ class Dimension(object):
def __init__(self, value):
"""Creates a new Dimension with the given value."""
from tensorflow.python.util import compat
if value is None:
self._value = None
else:
@ -429,8 +428,6 @@ class TensorShape(object):
TypeError: If dims cannot be converted to a list of dimensions.
"""
# TODO(irving): Eliminate the single integer special case.
from tensorflow.python.util import compat
if dims is None:
self._dims = None
elif isinstance(dims, compat.bytes_or_text_types):