/external/tensorflow/tensorflow/python/eager/ |
tape_test.py | 30 from tensorflow.python.ops import math_ops 38 mm = math_ops.matmul(a, b) 39 r = math_ops.reduce_sum(mm) 43 math_ops.matmul(dmm, b, transpose_b=True) + 44 math_ops.matmul(array_ops.ones_like(b * dr), b, transpose_b=True), 45 math_ops.matmul(a, dmm, transpose_b=True) + 46 math_ops.matmul(a, array_ops.ones_like(a) * dr, transpose_b=True) 89 mm = math_ops.matmul(a, b) 90 return math_ops.reduce_sum(mm) 96 math_ops.matmul [all...] |
/external/tensorflow/tensorflow/contrib/bayesflow/python/ops/ |
halton_sequence_impl.py | 29 from tensorflow.python.ops import math_ops 157 max_sizes_by_axes = _base_expansion_size(math_ops.reduce_max(indices), 160 max_size = math_ops.reduce_max(max_sizes_by_axes) 172 exponents_by_axes = array_ops.tile([math_ops.range(max_size)], [dim, 1]) 177 coeffs = math_ops.floor_div(indices, weights) 178 coeffs *= 1 - math_ops.cast(weight_mask, dtype) 180 return math_ops.reduce_sum(coeffs / weights, axis=-1) 209 sample_indices = math_ops.range(n, dtype=dtype) 211 sample_indices = math_ops.cast(sample_indices, dtype) 241 return math_ops.floor(math_ops.log(num) / math_ops.log(bases)) + [all...] |
monte_carlo_impl.py | 30 from tensorflow.python.ops import math_ops 105 log_f_plus_z = math_ops.log(nn.relu(f_z) + 1.) 106 log_f_minus_z = math_ops.log(nn.relu(-1. * f_z) + 1.) 111 return math_ops.exp(log_f_plus_integral) - math_ops.exp(log_f_minus_integral) 186 centered_values = math_ops.exp(log_values - center) 192 log_mean_of_values = math_ops.log(_sample_mean(centered_values)) + center 331 return math_ops.reduce_mean(f(samples), axis=axis, keep_dims=keep_dims) 351 return math_ops.reduce_mean(fx, axis=axis, keep_dims=keep_dims) 356 return math_ops.reduce_mean(values, reduction_indices=[0] [all...] |
mcmc_diagnostics_impl.py | 30 from tensorflow.python.ops import math_ops 171 mask = math_ops.cast(mask, dtype=dt) 173 mask = math_ops.cumsum(mask, axis=0) 175 mask = math_ops.maximum(1. - mask, 0.) 187 k = math_ops.range(0., _axis_size(auto_corr, axis=0)) 198 return n / (-1 + 2 * math_ops.reduce_sum(nk_factor * auto_corr, axis=0)) 338 sample_axis = math_ops.range(0, sample_ndims) 339 chain_axis = math_ops.range(sample_ndims, 341 sample_and_chain_axis = math_ops.range( 351 math_ops.reduce_mean(state, sample_axis, keepdims=True) [all...] |
/external/tensorflow/tensorflow/contrib/distributions/python/ops/bijectors/ |
power_transform.py | 25 from tensorflow.python.ops import math_ops 85 return math_ops.exp(x) 88 return math_ops.exp(math_ops.log1p(x * self.power) / self.power) 93 return math_ops.log(y) 96 return math_ops.expm1(math_ops.log(y) * self.power) / self.power 101 return (self.power - 1.) * math_ops.reduce_sum( 102 math_ops.log(y), axis=event_dims) 108 return math_ops.reduce_sum(x, axis=event_dims [all...] |
weibull.py | 25 from tensorflow.python.ops import math_ops 108 return -math_ops.expm1(-((x / self.scale) ** self.concentration)) 112 return self.scale * (-math_ops.log1p(-y)) ** (1 / self.concentration) 117 return math_ops.reduce_sum( 118 -math_ops.log1p(-y) + 119 (1 / self.concentration - 1) * math_ops.log(-math_ops.log1p(-y)) + 120 math_ops.log(self.scale / self.concentration), 126 return math_ops.reduce_sum( 128 (self.concentration - 1) * math_ops.log(x) [all...] |
gumbel.py | 25 from tensorflow.python.ops import math_ops 97 return math_ops.exp(-math_ops.exp(-z)) 101 return self.loc - self.scale * math_ops.log(-math_ops.log(y)) 106 return math_ops.reduce_sum( 107 math_ops.log(self.scale / (-math_ops.log(y) * y)), axis=event_dims) 112 return math_ops.reduce_sum( 113 -z - math_ops.exp(-z) - math_ops.log(self.scale), axis=event_dims [all...] |
/external/tensorflow/tensorflow/python/ops/ |
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) 72 middle = math_ops.matmul(l, grad, adjoint_a=True) 77 grad_a = math_ops.matmul( 78 math_ops.matmul(l_inverse, middle, adjoint_a=True), l_inverse) 97 qdq = math_ops.matmul(q, dq, adjoint_a=True) 99 rdr = math_ops.matmul(r, dr, adjoint_b=True) 109 grad_a = math_ops.matmul(q, dr + _TriangularSolve(tril, r)) 110 grad_b = _TriangularSolve(dq - math_ops.matmul(q, qdq), r [all...] |
metrics_impl.py | 29 from tensorflow.python.ops import math_ops 106 math_ops.equal(rank_diff, -1), 118 math_ops.equal(rank_diff, 1), maybe_squeeze_weights, 124 math_ops.equal(weights_rank_tensor, 0), lambda: weights, 151 math_ops.equal( 175 math_ops.equal(array_ops.rank(predictions), 191 t = math_ops.truediv(numerator, denominator) 193 condition = math_ops.greater(denominator, zero) 194 zero = math_ops.cast(zero, t.dtype) 212 math_ops.equal [all...] |
nn_impl.py | 32 from tensorflow.python.ops import math_ops 90 result = math_ops.exp(log_input) - log_input * targets 97 stirling_approx = (targets * math_ops.log(targets)) - targets + ( 98 point_five * math_ops.log(two_pi * targets)) 101 cond = math_ops.logical_and(targets >= zeros, targets <= ones) 180 return math_ops.add( 182 math_ops.log1p(math_ops.exp(neg_abs_logits)), 257 return math_ops.add( 259 log_weight * (math_ops.log1p(math_ops.exp(-math_ops.abs(logits))) [all...] |
/external/tensorflow/tensorflow/python/profiler/ |
tfprof_logger_test.py | 23 from tensorflow.python.ops import math_ops 32 y = math_ops.matmul(a, b) 38 return math_ops.matmul(a, b)
|
/external/tensorflow/tensorflow/contrib/solvers/python/ops/ |
util.py | 25 from tensorflow.python.ops import math_ops 44 apply=lambda v: math_ops.matmul(matrix, v, adjoint_a=False), 45 apply_adjoint=lambda v: math_ops.matmul(matrix, v, adjoint_a=True)) 67 return math_ops.reduce_sum(math_ops.conj(x) * y) 77 return math_ops.sqrt(l2norm_squared(v))
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
bucketize_op_test.py | 23 from tensorflow.python.ops import math_ops 30 op = math_ops._bucketize( 38 op = math_ops._bucketize( 46 op = math_ops._bucketize( 54 op = math_ops._bucketize( 64 math_ops._bucketize(constant_op.constant([-5, 0]), boundaries=0)
|
cwise_ops_test.py | 34 from tensorflow.python.ops import math_ops 110 if x.dtype in (np.complex64, np.complex128) and tf_func == math_ops.sign: 210 self._compareBoth(x, np.abs, math_ops.abs) 212 self._compareBoth(x, np.negative, math_ops.negative) 214 self._compareBoth(y, self._inv, math_ops.reciprocal) 215 self._compareBoth(x, np.square, math_ops.square) 216 self._compareBoth(z, np.sqrt, math_ops.sqrt) 217 self._compareBoth(z, self._rsqrt, math_ops.rsqrt) 218 self._compareBoth(x, np.exp, math_ops.exp) 219 self._compareBoth(x, np.expm1, math_ops.expm1 [all...] |
argmax_op_test.py | 23 from tensorflow.python.ops import math_ops 61 self._testBothArg(math_ops.argmax, x, 0, x.argmax()) 62 self._testBothArg(math_ops.argmin, x, 0, x.argmin()) 69 self._testBothArg(math_ops.argmax, x, axis, x.argmax(axis)) 70 self._testBothArg(math_ops.argmin, x, axis, x.argmin(axis)) 80 ans = math_ops.argmax(x, axis=0, output_type=dtypes.int32) 88 ans = math_ops.argmin(x, axis=0, output_type=dtypes.int32) 107 for op in math_ops.argmin, math_ops.argmax: 114 for op in math_ops.argmin, math_ops.argmax [all...] |
/external/tensorflow/tensorflow/contrib/timeseries/python/timeseries/state_space_models/ |
kalman_filter.py | 30 from tensorflow.python.ops import math_ops 131 min_diag = math_ops.reduce_min(diag) 170 math_ops.matmul( 207 prior_variance_transitioned = math_ops.matmul( 208 math_ops.matmul(transition_matrices, prior_state_var), 243 kalman_solve_rhs = math_ops.matmul( 253 math_ops.matmul( 258 gain_obs = math_ops.matmul( 266 posterior_state_var = math_ops.matmul(identity_minus_factor, 280 left_multiplied_state_var = math_ops.matmul(identity_minus_factor [all...] |
/external/tensorflow/tensorflow/contrib/distributions/python/ops/ |
test_util.py | 27 from tensorflow.python.ops import math_ops 87 batch_size = math_ops.reduce_prod(dist.batch_shape_tensor()) 93 probs = math_ops.exp(dist.log_prob(edges)) 128 x = math_ops.to_float(dist.sample(num_samples, seed=seed)) 129 sample_mean = math_ops.reduce_mean(x, axis=0) 130 sample_variance = math_ops.reduce_mean( 131 math_ops.square(x - sample_mean), axis=0) 132 sample_stddev = math_ops.sqrt(sample_variance) 178 value_range = [math_ops.reduce_min(x), 1 + math_ops.reduce_max(x) [all...] |
/external/tensorflow/tensorflow/contrib/opt/python/training/ |
powersign.py | 26 from tensorflow.python.ops import math_ops 118 math_ops.cast(self._lr_t, var.dtype.base_dtype), 119 math_ops.cast(self._logbase_t, var.dtype.base_dtype), 120 math_ops.cast(self._sign_decay_t, var.dtype.base_dtype), 121 math_ops.cast(self._beta_t, var.dtype.base_dtype), 130 math_ops.cast(self._lr_t, var.dtype.base_dtype), 131 math_ops.cast(self._logbase_t, var.dtype.base_dtype), 132 math_ops.cast(self._sign_decay_t, var.dtype.base_dtype), 133 math_ops.cast(self._beta_t, var.dtype.base_dtype), 138 lr_t = math_ops.cast(self._lr_t, var.dtype.base_dtype [all...] |
/external/tensorflow/tensorflow/python/ops/distributions/ |
special_math.py | 27 from tensorflow.python.ops import math_ops 96 z = math_ops.abs(w) 97 y = array_ops.where(math_ops.less(z, half_sqrt_2), 98 1. + math_ops.erf(w), 99 array_ops.where(math_ops.greater(w, 0.), 100 2. - math_ops.erfc(z), 101 math_ops.erfc(z))) 217 z = math_ops.sqrt(-2. * math_ops.log(sanitized_mcp)) 218 first_term = z - math_ops.log(z) / [all...] |
/external/tensorflow/tensorflow/python/training/ |
adam.py | 24 from tensorflow.python.ops import math_ops 146 math_ops.cast(beta1_power, var.dtype.base_dtype), 147 math_ops.cast(beta2_power, var.dtype.base_dtype), 148 math_ops.cast(self._lr_t, var.dtype.base_dtype), 149 math_ops.cast(self._beta1_t, var.dtype.base_dtype), 150 math_ops.cast(self._beta2_t, var.dtype.base_dtype), 151 math_ops.cast(self._epsilon_t, var.dtype.base_dtype), 160 math_ops.cast(beta1_power, grad.dtype.base_dtype), 161 math_ops.cast(beta2_power, grad.dtype.base_dtype), 162 math_ops.cast(self._lr_t, grad.dtype.base_dtype) [all...] |
/external/tensorflow/tensorflow/contrib/coder/python/ops/ |
coder_ops_test.py | 24 from tensorflow.python.ops import math_ops 38 histogram = math_ops.bincount(data, minlength=10, maxlength=10) 39 cdf = math_ops.cumsum(histogram, exclusive=False) 43 data = math_ops.cast(data, dtypes.int16)
|
/external/tensorflow/tensorflow/contrib/kfac/python/kernel_tests/ |
op_queue_test.py | 23 from tensorflow.python.ops import math_ops 33 math_ops.add(1, 2), 34 math_ops.subtract(1, 2), 35 math_ops.reduce_mean([1, 2]),
|
/external/tensorflow/tensorflow/contrib/sparsemax/python/ops/ |
sparsemax_loss.py | 23 from tensorflow.python.ops import math_ops 51 math_ops.reduce_mean(logits, axis=1)[:, array_ops.newaxis] 54 support = math_ops.cast(sparsemax > 0, sparsemax.dtype) 60 return math_ops.reduce_sum(sum_s + q_part, axis=1)
|
/external/tensorflow/tensorflow/compiler/tests/ |
argminmax_test.py | 26 from tensorflow.python.ops import math_ops 53 lambda x: math_ops.argmax(x, axis=0, output_type=dtypes.int32), 57 lambda x: math_ops.argmax(x, axis=0, output_type=dtypes.int32), 61 lambda x: math_ops.argmax(x, axis=1, output_type=dtypes.int32), 66 lambda x: math_ops.argmin(x, axis=0, output_type=dtypes.int32), 70 lambda x: math_ops.argmin(x, axis=0, output_type=dtypes.int32), 74 lambda x: math_ops.argmin(x, axis=1, output_type=dtypes.int32),
|
/external/tensorflow/tensorflow/contrib/seq2seq/python/ops/ |
loss.py | 24 from tensorflow.python.ops import math_ops 97 crossent = math_ops.reduce_sum(crossent) 98 total_size = math_ops.reduce_sum(weights) 106 crossent = math_ops.reduce_sum(crossent, axis=[1]) 107 total_size = math_ops.reduce_sum(weights, axis=[1]) 111 crossent = math_ops.reduce_sum(crossent, axis=[0]) 112 total_size = math_ops.reduce_sum(weights, axis=[0])
|