message: BUG: make Dimension compatible with integer
diff: @@ -41,6 +41,7 @@ import numpy as _np
  import six as _six
  from tensorflow.python.util.all_util import remove_undocumented
  +from tensorflow.python.framework.tensor_shape import Dimension
  def as_bytes(bytes_or_text, encoding='utf-8'):
  @@ -110,7 +111,7 @@ def as_str_any(value):
  # Numpy 1.8 scalars don't inherit from numbers.Integral in Python 3, so we
  # need to check them specifically. The same goes from Real and Complex.
  -integral_types = (_numbers.Integral, _np.integer)
  +integral_types = (_numbers.Integral, _np.integer, Dimension)
  real_types = (_numbers.Real, _np.integer, _np.floating)
  complex_types = (_numbers.Complex, _np.number)
  