Merge commit for internal changes
authorScott Zhu <scottzhu@google.com>
Fri, 13 Apr 2018 16:32:36 +0000 (09:32 -0700)
committerScott Zhu <scottzhu@google.com>
Fri, 13 Apr 2018 16:32:36 +0000 (09:32 -0700)
18 files changed:
1  2 
tensorflow/compiler/jit/mark_for_compilation_pass.cc
tensorflow/contrib/autograph/converters/call_trees.py
tensorflow/contrib/autograph/impl/api.py
tensorflow/contrib/autograph/impl/conversion.py
tensorflow/contrib/data/__init__.py
tensorflow/contrib/data/python/kernel_tests/BUILD
tensorflow/contrib/data/python/ops/BUILD
tensorflow/contrib/lite/kernels/internal/optimized/optimized_ops.h
tensorflow/contrib/lite/kernels/internal/reference/reference_ops.h
tensorflow/core/kernels/BUILD
tensorflow/python/BUILD
tensorflow/python/framework/dtypes.py
tensorflow/python/framework/dtypes_test.py
tensorflow/python/framework/tensor_shape.py
tensorflow/python/framework/tensor_shape_test.py
tensorflow/python/keras/_impl/keras/layers/normalization.py
tensorflow/tools/docs/generate_lib.py
tensorflow/workspace.bzl

Simple merge
@@@ -101,20 -108,36 +108,37 @@@ py_library
  )
  
  py_library(
-     name = "transformation_ops",
-     srcs = [
-         "batching.py",
-         "enumerate_ops.py",
-         "error_ops.py",
-         "grouping.py",
-         "interleave_ops.py",
-         "resampling.py",
-         "scan_ops.py",
-         "sliding.py",
-         "stats_ops.py",
-         "threadpool.py",
-         "unique.py",
+     name = "batching",
+     srcs = ["batching.py"],
+     srcs_version = "PY2AND3",
+     deps = [
++        "//tensorflow/contrib/framework:framework_py",
+         "//tensorflow/python:array_ops",
+         "//tensorflow/python:dataset_ops_gen",
+         "//tensorflow/python:dtypes",
+         "//tensorflow/python:framework_ops",
+         "//tensorflow/python:math_ops",
+         "//tensorflow/python:tensor_shape",
+         "//tensorflow/python:tensor_util",
+         "//tensorflow/python/data/ops:dataset_ops",
+         "//tensorflow/python/data/util:nest",
+         "//tensorflow/python/data/util:sparse",
      ],
+ )
+ py_library(
+     name = "enumerate_ops",
+     srcs = ["enumerate_ops.py"],
+     srcs_version = "PY2AND3",
+     deps = [
+         "//tensorflow/python:dtypes",
+         "//tensorflow/python/data/ops:dataset_ops",
+     ],
+ )
+ py_library(
+     name = "error_ops",
+     srcs = ["error_ops.py"],
      srcs_version = "PY2AND3",
      deps = [
          ":contrib_op_loader",
Simple merge
Simple merge
Simple merge
@@@ -295,9 -295,15 +295,19 @@@ class TypesTest(test_util.TensorFlowTes
      self.assertNotEqual(dtypes.int32, int)
      self.assertNotEqual(dtypes.float64, 2.1)
  
 +  def testPythonTypesConversion(self):
 +    self.assertIs(dtypes.float32, dtypes.as_dtype(float))
 +    self.assertIs(dtypes.bool, dtypes.as_dtype(bool))
 +
+   def testReduce(self):
+     for enum in dtypes._TYPE_TO_STRING:
+       dtype = dtypes.DType(enum)
+       ctor, args = dtype.__reduce__()
+       self.assertEquals(ctor, dtypes.as_dtype)
+       self.assertEquals(args, (dtype.name,))
+       reconstructed = ctor(*args)
+       self.assertEquals(reconstructed, dtype)
  if __name__ == "__main__":
    googletest.main()
Simple merge
Simple merge