Home
last modified time | relevance | path

Searched refs:x_dtype (Results 1 – 10 of 10) sorted by relevance

/external/tensorflow/tensorflow/python/kernel_tests/
Dsparse_matmul_op_test.py50 x_dtype=dtypes.float32, argument
53 tf_x = math_ops.cast(x, x_dtype)
79 for x_dtype in (dtypes.float32, dtypes.bfloat16):
81 self._testCpuMatmul(x, y, x_dtype=x_dtype, y_dtype=y_dtype)
87 for x_dtype in (dtypes.float32, dtypes.bfloat16):
89 self._testCpuMatmul(x, y, x_dtype=x_dtype, y_dtype=y_dtype)
95 for x_dtype in (dtypes.float32, dtypes.bfloat16):
97 self._testCpuMatmul(x, y, x_dtype=x_dtype, y_dtype=y_dtype)
106 for x_dtype in (dtypes.float32, dtypes.bfloat16):
110 self._testCpuMatmul(x, y, x_dtype=x_dtype, y_dtype=y_dtype)
[all …]
/external/tensorflow/tensorflow/python/ops/
Dgradient_checker_v2.py117 xs = [array_ops.placeholder(x_dtype) for x_dtype in xs_dtypes]
218 x_dtype = xs[param].dtype
224 x_size = _product(x_shape) * (2 if x_dtype.is_complex else 1)
226 x_dtype = x_dtype.real_dtype.as_numpy_dtype
238 jacobian = np.zeros((x_size, y_size), dtype=x_dtype)
245 original = x.ravel().view(x_dtype)[row]
246 x.ravel().view(x_dtype)[row] += delta
248 x.ravel().view(x_dtype)[row] = original
249 x.ravel().view(x_dtype)[row] -= delta
251 x.ravel().view(x_dtype)[row] = original
Dnn_fused_batchnorm_test.py58 x_dtype, argument
64 x_val = np.random.random_sample(x_shape).astype(x_dtype)
92 atol = 2e-3 if x_dtype == np.float16 else 1e-3
110 x_dtype, argument
116 x_val = np.random.random_sample(x_shape).astype(x_dtype)
134 y_atol = 2e-3 if x_dtype == np.float16 else 1e-3
183 x_dtype, argument
190 x_val = np.random.random_sample(x_shape).astype(x_dtype)
212 if x_dtype != np.float16:
235 x_err_tolerance = 2e-3 if x_dtype == np.float16 else 1e-3
[all …]
Dgradient_checker_v2_test.py107 x_dtype = c.dtype
108 x = constant_op.constant(_random_complex(x_shape, x_dtype))
114 x = constant_op.constant(_random_complex(x_shape, x_dtype))
123 x_dtype = dtypes.complex64
124 x = constant_op.constant(_random_complex(x_shape, x_dtype))
130 x = constant_op.constant(_random_complex(x_shape, x_dtype))
Dmath_ops.py940 x_dtype = sp_values.dtype.base_dtype
942 if x_dtype != y_dtype:
944 (x_dtype, y_dtype))
946 dtype = _TRUEDIV_TABLE[x_dtype]
948 raise TypeError("Invalid dtype %r in __truediv__" % x_dtype)
960 x_dtype = x.dtype.base_dtype
962 if x_dtype != y_dtype:
964 (x_dtype, y_dtype))
966 dtype = _TRUEDIV_TABLE[x_dtype]
968 raise TypeError("Invalid dtype %r in __truediv__" % x_dtype)
[all …]
Dgradient_checker.py170 x_dtype = x.dtype.real_dtype.as_numpy_dtype
177 jacobian = np.zeros((x_size, y_size), dtype=x_dtype)
184 x_pos.ravel().view(x_dtype)[row] += delta
186 x_neg.ravel().view(x_dtype)[row] -= delta
Dnn_grad.py935 x_dtype = x.dtype.base_dtype
936 if x_dtype == dtypes.float16:
967 return math_ops.cast(grad_x, x_dtype), grad_scale, grad_offset
983 return math_ops.cast(grad_x, x_dtype), grad_scale, grad_offset
/external/tensorflow/tensorflow/python/ops/distributions/
Dutil.py343 x_dtype = x.dtype.base_dtype
344 max_event_size = (_largest_integer_by_dtype(x_dtype)
345 if x_dtype.is_floating else 0)
348 "({}).".format(x_dtype.name))
363 x_dtype.name, event_size, max_event_size))
379 x_dtype.name, max_event_size)),
/external/tensorflow/tensorflow/cc/gradients/
Dmath_grad.cc505 DataType x_dtype = x.type(); in PowGrad() local
506 auto zero = Cast(scope, Const(scope, 0.0), x_dtype); in PowGrad()
507 if (x_dtype == DT_COMPLEX64 || x_dtype == DT_COMPLEX128) { in PowGrad()
/external/tensorflow/tensorflow/python/keras/engine/
Ddistributed_training_utils.py304 x_dtype = x_values[0].dtype
306 if x_dtype != x_values[i].dtype: