Issue 1:
http://ci.tensorflow.org/job/tf-master-win-bzl/2063/console

13:00:56 INFO: From Testing //py_test_dir/tensorflow/python:framework_dtypes_test:
13:00:56 ==================== Test output for //py_test_dir/tensorflow/python:framework_dtypes_test:
13:00:56 .........F\\?\C:\tmp\Bazel.runfiles_fnb6t73_\runfiles\org_tensorflow\py_test_dir\tensorflow\python\framework\dtypes_test.py:277: DeprecationWarning: Please use assertEqual instead.
13:00:56 self.assertEquals(dtype.min, np.finfo(numpy_dtype).min)
13:00:56 ......
13:00:56 ======================================================================
13:00:56 FAIL: testIsUnsigned (__main__.TypesTest)
13:00:56 ----------------------------------------------------------------------
13:00:56 Traceback (most recent call last):
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_fnb6t73_\runfiles\org_tensorflow\py_test_dir\tensorflow\python\framework\dtypes_test.py", line 219, in testIsUnsigned
13:00:56 self.assertEqual(dtypes.as_dtype("bfloat16").is_unsigned, False)
13:00:56 AssertionError: True != False
13:00:56
13:00:56 ----------------------------------------------------------------------
13:00:56 Ran 16 tests in 0.009s
13:00:56
13:00:56 FAILED (failures=1)
13:00:56 <dtype: 'float32'>: -3.40282e+38 - 3.40282e+38
13:00:56 <dtype: 'float64'>: -1.79769313486e+308 - 1.79769313486e+308
13:00:56 <dtype: 'int32'>: -2147483648 - 2147483647
13:00:56 <dtype: 'uint8'>: 0 - 255
13:00:56 <dtype: 'int16'>: -32768 - 32767
13:00:56 <dtype: 'int8'>: -128 - 127
13:00:56 <dtype: 'int64'>: -9223372036854775808 - 9223372036854775807
13:00:56 <dtype: 'bfloat16'>: 0 - 0
13:00:56 <dtype: 'uint16'>: 0 - 65535
13:00:56 <dtype: 'float16'>: -65504.0 - 65504.0
13:00:56 <dtype: 'uint32'>: 0 - 4294967295
13:00:56 <dtype: 'uint64'>: 0 - 18446744073709551615
13:00:56 <dtype: 'float32_ref'>: -3.40282e+38 - 3.40282e+38
13:00:56 <dtype: 'float64_ref'>: -1.79769313486e+308 - 1.79769313486e+308
13:00:56 <dtype: 'int32_ref'>: -2147483648 - 2147483647
13:00:56 <dtype: 'uint8_ref'>: 0 - 255
13:00:56 <dtype: 'int16_ref'>: -32768 - 32767
13:00:56 <dtype: 'int8_ref'>: -128 - 127
13:00:56 <dtype: 'int64_ref'>: -9223372036854775808 - 9223372036854775807
13:00:56 <dtype: 'bfloat16_ref'>: 0 - 0
13:00:56 <dtype: 'uint16_ref'>: 0 - 65535
13:00:56 <dtype: 'float16_ref'>: -65504.0 - 65504.0
13:00:56 <dtype: 'uint32_ref'>: 0 - 4294967295
13:00:56 <dtype: 'uint64_ref'>: 0 - 18446744073709551615
13:00:56 ================================================================================
13:00:56 INFO: From Testing //py_test_dir/tensorflow/python:bfloat16_test:
13:00:56 ==================== Test output for //py_test_dir/tensorflow/python:bfloat16_test:
13:00:56 FFF.F.FFFFFFFFFFFFFFFF.
13:00:56 ======================================================================
13:00:56 FAIL: testAdd (__main__.Bfloat16NumPyTest)
13:00:56 ----------------------------------------------------------------------
13:00:56 Traceback (most recent call last):
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 189, in testAdd
13:00:56 self.assertAllClose(np.array([[5, 7, 9]]), x + y)
13:00:56 File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\test_util.py", line 1083, in assertAllClose
13:00:56 self._assertArrayLikeAllClose(a, b, rtol=rtol, atol=atol)
13:00:56 File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\test_util.py", line 1053, in _assertArrayLikeAllClose
13:00:56 np.testing.assert_allclose(a, b, rtol=rtol, atol=atol, err_msg=msg)
13:00:56 File "C:\Program Files\Anaconda3\lib\site-packages\numpy\testing\utils.py", line 1411, in assert_allclose
13:00:56 verbose=verbose, header=header, equal_nan=equal_nan)
13:00:56 File "C:\Program Files\Anaconda3\lib\site-packages\numpy\testing\utils.py", line 796, in assert_array_compare
13:00:56 raise AssertionError(msg)
13:00:56 AssertionError:
13:00:56 Not equal to tolerance rtol=1e-06, atol=1e-06
13:00:56 None
13:00:56 (mismatch 100.0%)
13:00:56 x: array([[5, 7, 9]])
13:00:56 y: array([[ 0., 0., 0.]], dtype=float16)
13:00:56
13:00:56 ======================================================================
13:00:56 FAIL: testArray (__main__.Bfloat16NumPyTest)
13:00:56 ----------------------------------------------------------------------
13:00:56 Traceback (most recent call last):
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 172, in testArray
13:00:56 self.assertEqual("[[bfloat16(1) bfloat16(2) bfloat16(3)]]", str(x))
13:00:56 AssertionError: '[[bfloat16(1) bfloat16(2) bfloat16(3)]]' != '[[bfloat16(0) bfloat16(0) bfloat16(0)]]'
13:00:56 - [[bfloat16(1) bfloat16(2) bfloat16(3)]]
13:00:56 ? ^ ^ ^
13:00:56 + [[bfloat16(0) bfloat16(0) bfloat16(0)]]
13:00:56 ? ^ ^ ^
13:00:56
13:00:56
13:00:56 ======================================================================
13:00:56 FAIL: testCasts (__main__.Bfloat16NumPyTest)
13:00:56 ----------------------------------------------------------------------
13:00:56 Traceback (most recent call last):
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 181, in testCasts
13:00:56 self.assertTrue(np.all(x == y))
13:00:56 AssertionError: False is not true
13:00:56
13:00:56 ======================================================================
13:00:56 FAIL: testLogSumExp (__main__.Bfloat16NumPyTest)
13:00:56 ----------------------------------------------------------------------
13:00:56 Traceback (most recent call last):
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 196, in testLogSumExp
13:00:56 atol=2e-2)
13:00:56 File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\test_util.py", line 1083, in assertAllClose
13:00:56 self._assertArrayLikeAllClose(a, b, rtol=rtol, atol=atol)
13:00:56 File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\test_util.py", line 1053, in _assertArrayLikeAllClose
13:00:56 np.testing.assert_allclose(a, b, rtol=rtol, atol=atol, err_msg=msg)
13:00:56 File "C:\Program Files\Anaconda3\lib\site-packages\numpy\testing\utils.py", line 1411, in assert_allclose
13:00:56 verbose=verbose, header=header, equal_nan=equal_nan)
13:00:56 File "C:\Program Files\Anaconda3\lib\site-packages\numpy\testing\utils.py", line 796, in assert_array_compare
13:00:56 raise AssertionError(msg)
13:00:56 AssertionError:
13:00:56 Not equal to tolerance rtol=1e-06, atol=0.02
13:00:56 None
13:00:56 (mismatch 100.0%)
13:00:56 x: array([[ 4.048587, 5.048587, 6.048587]], dtype=float32)
13:00:56 y: array([[ 0.693359, 0.693359, 0.693359]], dtype=float16)
13:00:56
13:00:56 ======================================================================
13:00:56 FAIL: testAdd (__main__.Bfloat16Test)
13:00:56 ----------------------------------------------------------------------
13:00:56 Traceback (most recent call last):
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 89, in testAdd
13:00:56 self._assertFloatIdentical(1, float(bfloat16(1) + bfloat16(0)))
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 48, in _assertFloatIdentical
13:00:56 self.assertEqual(v, w)
13:00:56 AssertionError: 1 != 0.0
13:00:56
13:00:56 ======================================================================
13:00:56 FAIL: testDiv (__main__.Bfloat16Test)
13:00:56 ----------------------------------------------------------------------
13:00:56 Traceback (most recent call last):
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 123, in testDiv
13:00:56 self.assertTrue(math.isnan(float(bfloat16(0) / bfloat16(0))))
13:00:56 AssertionError: False is not true
13:00:56
13:00:56 ======================================================================
13:00:56 FAIL: testEqual (__main__.Bfloat16Test)
13:00:56 ----------------------------------------------------------------------
13:00:56 Traceback (most recent call last):
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 156, in testEqual
13:00:56 self.assertEqual(v == w, bfloat16(v) == bfloat16(w))
13:00:56 AssertionError: False != True
13:00:56
13:00:56 ======================================================================
13:00:56 FAIL: testGreater (__main__.Bfloat16Test)
13:00:56 ----------------------------------------------------------------------
13:00:56 Traceback (most recent call last):
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 146, in testGreater
13:00:56 self.assertEqual(v > w, bfloat16(v) > bfloat16(w))
13:00:56 AssertionError: True != False
13:00:56
13:00:56 ======================================================================
13:00:56 FAIL: testGreaterEqual (__main__.Bfloat16Test)
13:00:56 ----------------------------------------------------------------------
13:00:56 Traceback (most recent call last):
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 151, in testGreaterEqual
13:00:56 self.assertEqual(v >= w, bfloat16(v) >= bfloat16(w))
13:00:56 AssertionError: False != True
13:00:56
13:00:56 ======================================================================
13:00:56 FAIL: testHash (__main__.Bfloat16Test)
13:00:56 ----------------------------------------------------------------------
13:00:56 Traceback (most recent call last):
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 79, in testHash
13:00:56 self.assertEqual(0x3f80, hash(bfloat16(1.0)))
13:00:56 AssertionError: 16256 != 0
13:00:56
13:00:56 ======================================================================
13:00:56 FAIL: testLess (__main__.Bfloat16Test)
13:00:56 ----------------------------------------------------------------------
13:00:56 Traceback (most recent call last):
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 136, in testLess
13:00:56 self.assertEqual(v < w, bfloat16(v) < bfloat16(w))
13:00:56 AssertionError: True != False
13:00:56
13:00:56 ======================================================================
13:00:56 FAIL: testLessEqual (__main__.Bfloat16Test)
13:00:56 ----------------------------------------------------------------------
13:00:56 Traceback (most recent call last):
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 141, in testLessEqual
13:00:56 self.assertEqual(v <= w, bfloat16(v) <= bfloat16(w))
13:00:56 AssertionError: False != True
13:00:56
13:00:56 ======================================================================
13:00:56 FAIL: testMul (__main__.Bfloat16Test)
13:00:56 ----------------------------------------------------------------------
13:00:56 Traceback (most recent call last):
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 114, in testMul
13:00:56 self._assertFloatIdentical(-1, float(bfloat16(1) * bfloat16(-1)))
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 48, in _assertFloatIdentical
13:00:56 self.assertEqual(v, w)
13:00:56 AssertionError: -1 != 0.0
13:00:56
13:00:56 ======================================================================
13:00:56 FAIL: testNegate (__main__.Bfloat16Test)
13:00:56 ----------------------------------------------------------------------
13:00:56 Traceback (most recent call last):
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 85, in testNegate
13:00:56 self._assertFloatIdentical(-v, float(-bfloat16(v)))
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 48, in _assertFloatIdentical
13:00:56 self.assertEqual(v, w)
13:00:56 AssertionError: -0.0 != 4.591774807899561e-41
13:00:56
13:00:56 ======================================================================
13:00:56 FAIL: testNotEqual (__main__.Bfloat16Test)
13:00:56 ----------------------------------------------------------------------
13:00:56 Traceback (most recent call last):
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 161, in testNotEqual
13:00:56 self.assertEqual(v != w, bfloat16(v) != bfloat16(w))
13:00:56 AssertionError: True != False
13:00:56
13:00:56 ======================================================================
13:00:56 FAIL: testRepr (__main__.Bfloat16Test)
13:00:56 ----------------------------------------------------------------------
13:00:56 Traceback (most recent call last):
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 69, in testRepr
13:00:56 self.assertEqual("bfloat16(1)", repr(bfloat16(1)))
13:00:56 AssertionError: 'bfloat16(1)' != 'bfloat16(0)'
13:00:56 - bfloat16(1)
13:00:56 ? ^
13:00:56 + bfloat16(0)
13:00:56 ? ^
13:00:56
13:00:56
13:00:56 ======================================================================
13:00:56 FAIL: testRoundTripToFloat (__main__.Bfloat16Test)
13:00:56 ----------------------------------------------------------------------
13:00:56 Traceback (most recent call last):
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 52, in testRoundTripToFloat
13:00:56 self._assertFloatIdentical(v, float(bfloat16(v)))
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 48, in _assertFloatIdentical
13:00:56 self.assertEqual(v, w)
13:00:56 AssertionError: 1.0 != 0.0
13:00:56
13:00:56 ======================================================================
13:00:56 FAIL: testRoundTripToInt (__main__.Bfloat16Test)
13:00:56 ----------------------------------------------------------------------
13:00:56 Traceback (most recent call last):
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 56, in testRoundTripToInt
13:00:56 self.assertEqual(v, int(bfloat16(v)))
13:00:56 AssertionError: -256 != 0
13:00:56
13:00:56 ======================================================================
13:00:56 FAIL: testStr (__main__.Bfloat16Test)
13:00:56 ----------------------------------------------------------------------
13:00:56 Traceback (most recent call last):
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 60, in testStr
13:00:56 self.assertEqual("1", str(bfloat16(1.0)))
13:00:56 AssertionError: '1' != '0'
13:00:56 - 1
13:00:56 + 0
13:00:56
13:00:56
13:00:56 ======================================================================
13:00:56 FAIL: testSub (__main__.Bfloat16Test)
13:00:56 ----------------------------------------------------------------------
13:00:56 Traceback (most recent call last):
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 101, in testSub
13:00:56 self._assertFloatIdentical(1, float(bfloat16(1) - bfloat16(0)))
13:00:56 File "\\?\C:\tmp\Bazel.runfiles_5lnmqasq\runfiles\org_tensorflow\py_test_dir\tensorflow\python\lib\core\bfloat16_test.py", line 48, in _assertFloatIdentical
13:00:56 self.assertEqual(v, w)
13:00:56 AssertionError: 1 != 0.0
13:00:56
13:00:56 ----------------------------------------------------------------------
13:00:56 Ran 23 tests in 0.014s
13:00:56
13:00:56 FAILED (failures=20)
13:00:56 not close where = (array([0, 0, 0], dtype=int64), array([0, 1, 2], dtype=int64))
13:00:56 not close lhs = [5 7 9]
13:00:56 not close rhs = [ 0. 0. 0.]
13:00:56 not close dif = [ 5. 7. 9.]
13:00:56 not close tol = [ 1.01327896e-06 1.01327896e-06 1.01327896e-06]
13:00:56 dtype = int32, shape = (1, 3)
13:00:56 not close where = (array([0, 0, 0], dtype=int64), array([0, 1, 2], dtype=int64))
13:00:56 not close lhs = [ 4.04858732 5.04858732 6.04858732]
13:00:56 not close rhs = [ 0.69335938 0.69335938 0.69335938]
13:00:56 not close dif = [ 3.35522795 4.35522795 5.35522795]
13:00:56 not close tol = [ 0.02000427 0.02000427 0.02000427]
13:00:56 dtype = float32, shape = (1, 3)
13:00:56 ================================================================================

@gunan

Issue 2:
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):

No

OS Platform and Distribution (e.g., Linux Ubuntu 16.04):

Windows 10

TensorFlow installed from (source or binary):

binary

TensorFlow version (use command below):

1.4.0

Python version:

3.5.4

Bazel version (if compiling from source):

None

GCC/Compiler version (if compiling from source):

None

CUDA/cuDNN version:

None

GPU model and memory:

None

Exact command to reproduce:

import tensorflow as tf
print(tf.bfloat16.is_unsigned)

Expected Output: False

Actual: True

Describe the problem

Source code / logs

https://ci.tensorflow.org/job/tf-master-win-bzl/2057/console

bfloat16_test/test.log