/external/tensorflow/tensorflow/python/ops/parallel_for/ |
D | math_test.py | 27 from tensorflow.python.ops import math_ops 40 math_ops.angle, 41 math_ops.imag, 42 math_ops.complex_abs, 43 math_ops.real, 44 math_ops.conj, 47 lambda x: math_ops.acosh(1 + math_ops.square(x)), 48 math_ops.abs, 49 math_ops.acos, 50 math_ops.asin, [all …]
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
D | cwise_ops_unary_test.py | 32 from tensorflow.python.ops import math_ops 96 if x.dtype in (np.complex64, np.complex128) and tf_func == math_ops.sign: 195 self._compareBoth(x, np.abs, math_ops.abs) 197 self._compareBoth(x, np.negative, math_ops.negative) 199 self._compareBoth(y, self._inv, math_ops.reciprocal) 200 self._compareBoth(x, np.square, math_ops.square) 201 self._compareBoth(z, np.sqrt, math_ops.sqrt) 202 self._compareBoth(z, self._rsqrt, math_ops.rsqrt) 203 self._compareBoth(x, np.exp, math_ops.exp) 204 self._compareBoth(x, np.expm1, math_ops.expm1) [all …]
|
D | basic_gpu_test.py | 33 from tensorflow.python.ops import math_ops 60 self._compareGPU(x, y, np.add, math_ops.add) 61 self._compareGPU(x, y, np.subtract, math_ops.subtract) 62 self._compareGPU(x, y, np.multiply, math_ops.multiply) 63 self._compareGPU(x, y + 0.1, np.true_divide, math_ops.truediv) 64 self._compareGPU(x, y + 0.1, np.floor_divide, math_ops.floordiv) 65 self._compareGPU(x, y, np.power, math_ops.pow) 70 self._compareGPU(x, y, np.add, math_ops.add) 71 self._compareGPU(x, y, np.subtract, math_ops.subtract) 72 self._compareGPU(x, y, np.multiply, math_ops.multiply) [all …]
|
/external/tensorflow/tensorflow/contrib/losses/python/metric_learning/ |
D | metric_loss_ops.py | 27 from tensorflow.python.ops import math_ops 52 pairwise_distances_squared = math_ops.add( 53 math_ops.reduce_sum(math_ops.square(feature), axis=[1], keepdims=True), 54 math_ops.reduce_sum( 55 math_ops.square(array_ops.transpose(feature)), 57 keepdims=True)) - 2.0 * math_ops.matmul(feature, 61 pairwise_distances_squared = math_ops.maximum(pairwise_distances_squared, 0.0) 63 error_mask = math_ops.less_equal(pairwise_distances_squared, 0.0) 69 pairwise_distances = math_ops.sqrt( 71 math_ops.cast(error_mask, dtypes.float32) * 1e-16) [all …]
|
/external/tensorflow/tensorflow/python/ops/ragged/ |
D | ragged_dispatch.py | 30 from tensorflow.python.ops import math_ops 292 math_ops.abs, 293 math_ops.acos, 294 math_ops.acosh, 295 math_ops.angle, 296 math_ops.asin, 297 math_ops.asinh, 298 math_ops.atan, 299 math_ops.atanh, 300 math_ops.cast, [all …]
|
D | ragged_dispatch_test.py | 33 from tensorflow.python.ops import math_ops 45 math_ops.abs, 46 math_ops.acos, 47 math_ops.acosh, 48 math_ops.angle, 49 math_ops.asin, 50 math_ops.asinh, 51 math_ops.atan, 52 math_ops.atanh, 53 math_ops.ceil, [all …]
|
D | ragged_operators.py | 21 from tensorflow.python.ops import math_ops 36 ragged_tensor.RaggedTensor.__ge__ = math_ops.greater_equal 37 ragged_tensor.RaggedTensor.__gt__ = math_ops.greater 38 ragged_tensor.RaggedTensor.__le__ = math_ops.less_equal 39 ragged_tensor.RaggedTensor.__lt__ = math_ops.less 42 ragged_tensor.RaggedTensor.__and__ = math_ops.logical_and 43 ragged_tensor.RaggedTensor.__rand__ = _right(math_ops.logical_and) 44 ragged_tensor.RaggedTensor.__invert__ = math_ops.logical_not 45 ragged_tensor.RaggedTensor.__ror__ = _right(math_ops.logical_or) 46 ragged_tensor.RaggedTensor.__or__ = math_ops.logical_or [all …]
|
/external/tensorflow/tensorflow/python/ops/ |
D | math_grad.py | 30 from tensorflow.python.ops import math_ops 35 return x // math_ops.maximum(y, 1) 85 output_shape_kept_dims = math_ops.reduced_shape(input_shape, op.inputs[1]) 94 output_shape_kept_dims = math_ops.reduced_shape(input_shape, op.inputs[1]) 102 indicators = math_ops.cast(math_ops.equal(y, op.inputs[0]), grad.dtype) 104 math_ops.reduce_sum(indicators, op.inputs[1]), output_shape_kept_dims) 106 return [math_ops.divide(indicators, num_selected) * grad, None] 136 math_ops.reduce_prod(input_shape), math_ops.reduce_prod(output_shape)) 137 return math_ops.truediv(sum_grad, math_ops.cast(factor, sum_grad.dtype)), None 153 output_shape_kept_dims = math_ops.reduced_shape(input_shape, op.inputs[1]) [all …]
|
D | metrics_impl.py | 30 from tensorflow.python.ops import math_ops 141 math_ops.equal(rank_diff, -1), 153 math_ops.equal(rank_diff, 1), maybe_squeeze_weights, 159 math_ops.equal(weights_rank_tensor, 0), lambda: weights, 186 math_ops.equal( 210 math_ops.equal(array_ops.rank(predictions), 228 return math_ops.div_no_nan(numerator, denominator, name=name) 259 predictions = math_ops.cast(predictions, dtypes.int64) 260 labels = math_ops.cast(labels, dtypes.int64) 261 num_classes = math_ops.cast(num_classes, dtypes.int64) [all …]
|
D | linalg_grad.py | 34 from tensorflow.python.ops import math_ops 42 return -math_ops.matmul( 43 ainv, math_ops.matmul(grad, ainv, adjoint_b=True), adjoint_a=True) 76 shape_slice_size = [math_ops.subtract(array_ops.size(b1_shape), 2)] 94 matrix_count = math_ops.reduce_prod(shape[0:-2]) 107 ksum = math_ops.add(k1, k2) 110 shape_slice_size = [math_ops.subtract(array_ops.size(shape), 2)] 148 middle = math_ops.matmul(l, grad, adjoint_a=True) 153 grad_a = math_ops.matmul( 154 math_ops.matmul(l_inverse, middle, adjoint_a=True), l_inverse) [all …]
|
/external/tensorflow/tensorflow/python/data/experimental/kernel_tests/optimization/ |
D | map_vectorization_test.py | 41 from tensorflow.python.ops import math_ops 50 logical_cases = [("LogicalNot", math_ops.logical_not)] 52 ("Angle", math_ops.angle), 53 ("ComplexAbs", math_ops.abs), 54 ("Conj", math_ops.conj), 55 ("Imag", math_ops.imag), 56 ("Real", math_ops.real), 59 ("Abs", math_ops.abs), 60 ("Acos", math_ops.acos), 61 ("Acosh", lambda x: math_ops.acosh(1 + math_ops.square(x))), [all …]
|
/external/tensorflow/tensorflow/contrib/losses/python/losses/ |
D | loss_ops.py | 28 from tensorflow.python.ops import math_ops 64 reduced_losses = math_ops.reduce_sum(losses, axis=axis) 65 reduced_losses = math_ops.multiply(reduced_losses, weights) 66 return math_ops.reduce_sum(reduced_losses) 80 total_loss = math_ops.reduce_sum(losses) 81 return math_ops.div_no_nan(total_loss, num_present, name="value") 104 losses = math_ops.cast(losses, dtypes.float32) 105 weights = math_ops.cast(ops.convert_to_tensor(weights), dtypes.float32) 120 mean_loss = math_ops.cast(mean_loss, input_dtype) 150 num_per_batch = math_ops.div( [all …]
|
/external/tensorflow/tensorflow/python/ops/losses/ |
D | losses_impl.py | 28 from tensorflow.python.ops import math_ops 92 total_loss = math_ops.reduce_sum(losses) 93 return math_ops.div_no_nan(total_loss, num_present, name="value") 120 and not math_ops.equal(weights, 0.0))): 123 weights = math_ops.cast(weights, dtype=dtypes.float32) 125 math_ops.equal(weights, 0.0), 130 return math_ops.reduce_sum( 132 axis=math_ops.range(1, array_ops.rank(present)), 135 return math_ops.reduce_sum(present, name=scope) 141 return math_ops.cast(array_ops.size(losses, name=scope), dtype=losses.dtype) [all …]
|
/external/tensorflow/tensorflow/contrib/gan/python/eval/python/ |
D | classifier_metrics_impl.py | 47 from tensorflow.python.ops import math_ops 111 si = array_ops.where(math_ops.less(s, eps), s, math_ops.sqrt(s)) 115 return math_ops.matmul( 116 math_ops.matmul(u, array_ops.diag(si)), v, transpose_b=True) 143 images = math_ops.cast(images, dtypes.float32) 186 return math_ops.reduce_sum( 187 p * (nn_ops.log_softmax(p_logits) - math_ops.log(q)), axis=1) 390 logits = math_ops.cast(logits, dtypes.float64) 393 q = math_ops.reduce_mean(p, axis=0) 396 log_score = math_ops.reduce_mean(kl) [all …]
|
/external/tensorflow/tensorflow/python/keras/optimizer_v2/ |
D | learning_rate_schedule.py | 28 from tensorflow.python.ops import math_ops 151 decay_steps = math_ops.cast(self.decay_steps, dtype) 152 decay_rate = math_ops.cast(self.decay_rate, dtype) 154 global_step_recomp = math_ops.cast(step, dtype) 157 p = math_ops.floor(p) 158 return math_ops.multiply( 159 initial_learning_rate, math_ops.pow(decay_rate, p), name=name) 255 b = math_ops.cast(b, x_recomp.dtype.base_dtype) 400 end_learning_rate = math_ops.cast(self.end_learning_rate, dtype) 401 power = math_ops.cast(self.power, dtype) [all …]
|
/external/tensorflow/tensorflow/compiler/tf2xla/python/ |
D | xla.py | 37 from tensorflow.python.ops import math_ops 76 abs = _unary_op(math_ops.abs) 78 conj = _unary_op(math_ops.conj) 79 cos = _unary_op(math_ops.cos) 80 ceil = _unary_op(math_ops.ceil) 81 digamma = _unary_op(math_ops.digamma) 82 erf = _unary_op(math_ops.erf) 83 erfc = _unary_op(math_ops.erfc) 85 exp = _unary_op(math_ops.exp) 86 expm1 = _unary_op(math_ops.expm1) [all …]
|
/external/tensorflow/tensorflow/contrib/metrics/python/ops/ |
D | metric_ops.py | 34 from tensorflow.python.ops import math_ops 560 predictions=math_ops.cast(predictions, dtype=dtypes.bool), 561 labels=math_ops.cast(labels, dtype=dtypes.bool), 581 math_ops.greater(fp + tn, 0), math_ops.div(fp, fp + tn), 0, name) 648 predictions=math_ops.cast(predictions, dtype=dtypes.bool), 649 labels=math_ops.cast(labels, dtype=dtypes.bool), 669 math_ops.greater(fn + tp, 0), math_ops.div(fn, fn + tp), 0, name) 749 math_ops.cast(labels, dtype=dtypes.bool), [1, -1]) 762 pred_is_pos = math_ops.greater( 766 pred_is_neg = math_ops.logical_not(pred_is_pos) [all …]
|
/external/tensorflow/tensorflow/contrib/opt/python/training/ |
D | sign_decay.py | 30 from tensorflow.python.ops import math_ops 55 global_step = math_ops.minimum(global_step, decay_steps) 56 remaining_steps = math_ops.cast( 57 decay_steps, dtypes.int32) - math_ops.cast(global_step, dtypes.int32) 58 decayed = (math_ops.cast(remaining_steps, dtypes.float32) / 59 math_ops.cast(decay_steps, dtypes.float32)) 60 return math_ops.maximum(0.0, decayed) 96 global_step = math_ops.minimum(global_step, decay_steps) 97 completed_fraction = (math_ops.cast(global_step, dtypes.float32) / 98 math_ops.cast(decay_steps, dtypes.float32)) [all …]
|
D | matrix_functions.py | 23 from tensorflow.python.ops import math_ops 47 return math_ops.logical_and(i < iter_count, err < old_err) 51 current_iterate = 0.5 * (3.0 * identity - math_ops.matmul(mat_z, mat_y)) 52 current_mat_y = math_ops.matmul(mat_y, current_iterate) 53 current_mat_z = math_ops.matmul(current_iterate, mat_z) 55 mat_sqrt_a = current_mat_y * math_ops.sqrt(norm) 56 mat_a_approx = math_ops.matmul(mat_sqrt_a, mat_sqrt_a) 58 current_err = math_ops.sqrt(math_ops.reduce_sum(residual * residual)) / norm 61 identity = linalg_ops.eye(math_ops.cast(mat_a_size, dtypes.int32)) 63 norm = math_ops.sqrt(math_ops.reduce_sum(mat_a * mat_a)) [all …]
|
D | ggt.py | 29 from tensorflow.python.ops import math_ops 137 initial_value=math_ops.cast(0., dtype=var_list[0].dtype.base_dtype), 193 flat_grad, math_ops.range(start_index, end_index), new_flat_grad) 207 flat_grad, math_ops.range(start_index, end_index), new_flat_grad) 227 next_grad_index = math_ops.floormod( 228 math_ops.cast(update_global_step - 1., dtypes.int32), window) 238 denom = math_ops.sqrt( 239 math_ops.minimum( 241 ops.convert_to_tensor(math_ops.cast(window, dtype=var_dtype)))) 247 m = array_ops.transpose(math_ops.divide(update_grad_buffer, denom)) [all …]
|
/external/tensorflow/tensorflow/python/training/ |
D | ftrl.py | 22 from tensorflow.python.ops import math_ops 156 math_ops.cast(self._learning_rate_tensor, var.dtype.base_dtype), 157 math_ops.cast(self._l1_regularization_strength_tensor, 159 math_ops.cast(self._l2_regularization_strength_tensor, 161 math_ops.cast(self._learning_rate_power_tensor, var.dtype.base_dtype), 169 math_ops.cast(self._learning_rate_tensor, var.dtype.base_dtype), 170 math_ops.cast(self._l1_regularization_strength_tensor, 172 math_ops.cast(self._l2_regularization_strength_tensor, 174 math_ops.cast(self._l2_shrinkage_regularization_strength_tensor, 176 math_ops.cast(self._learning_rate_power_tensor, var.dtype.base_dtype), [all …]
|
D | rmsprop.py | 47 from tensorflow.python.ops import math_ops 150 math_ops.cast(self._learning_rate_tensor, var.dtype.base_dtype), 151 math_ops.cast(self._decay_tensor, var.dtype.base_dtype), 152 math_ops.cast(self._momentum_tensor, var.dtype.base_dtype), 153 math_ops.cast(self._epsilon_tensor, var.dtype.base_dtype), 161 math_ops.cast(self._learning_rate_tensor, var.dtype.base_dtype), 162 math_ops.cast(self._decay_tensor, var.dtype.base_dtype), 163 math_ops.cast(self._momentum_tensor, var.dtype.base_dtype), 164 math_ops.cast(self._epsilon_tensor, var.dtype.base_dtype), 178 math_ops.cast(self._learning_rate_tensor, grad.dtype.base_dtype), [all …]
|
/external/tensorflow/tensorflow/contrib/timeseries/python/timeseries/state_space_models/ |
D | periodic.py | 30 from tensorflow.python.ops import math_ops 76 math_ops.range(self._periodicity - 1, dtype=powers.dtype), 83 is_row_negative = math_ops.equal(range_shape_padded + 1, powers[..., None]) 92 is_one = math_ops.equal(coord_diff % self._periodicity, 101 return math_ops.cast(positive_ones + negative_row_indicator[..., None], 141 math_ops.range(self._periodicity, dtype=num_steps.dtype), 153 self.dtype)[..., None] * noise_addition_scalar * math_ops.cast( 265 value = math_ops.cast(value, self.dtype) 266 return math_ops.less( 267 math_ops.abs(value - gen_math_ops.round(value)), [all …]
|
/external/tensorflow/tensorflow/python/ops/linalg/ |
D | linalg_impl.py | 29 from tensorflow.python.ops import math_ops 57 tensordot = math_ops.tensordot 58 trace = math_ops.trace 91 return 2.0 * math_ops.reduce_sum( 92 math_ops.log(math_ops.real(array_ops.matrix_diag_part(chol))), 133 matrix_2 = math_ops.matmul(matrix, matrix) 135 matrix_u = math_ops.matmul(matrix, tmp) 147 matrix_2 = math_ops.matmul(matrix, matrix) 148 matrix_4 = math_ops.matmul(matrix_2, matrix_2) 150 matrix_u = math_ops.matmul(matrix, tmp) [all …]
|
/external/tensorflow/tensorflow/contrib/training/python/training/ |
D | sgdr_learning_rate_decay.py | 25 from tensorflow.python.ops import math_ops, control_flow_ops 136 global_step = math_ops.cast(global_step, dtype) 137 t_0 = math_ops.cast(initial_period_steps, dtype) 138 t_mul = math_ops.cast(t_mul, dtype) 139 m_mul = math_ops.cast(m_mul, dtype) 141 c_one = math_ops.cast(constant_op.constant(1.0), dtype) 142 c_half = math_ops.cast(constant_op.constant(0.5), dtype) 143 c_pi = math_ops.cast(constant_op.constant(math.pi), dtype) 146 x_val = math_ops.div(global_step, t_0) 163 i_restart = math_ops.floor( [all …]
|