/external/tensorflow/tensorflow/python/ops/risc/ |
D | risc_grad.py | 25 def _RiscAbsGrad(_, grad): argument 32 def _RiscAddGrad(_, grad): argument 39 def _RiscBinaryArithmeticGrad(_, grad): argument 46 def _RiscBinaryComparisonGrad(_, grad): argument 53 def _RiscBitcastGrad(_, grad): argument 60 def _RiscBroadcastGrad(_, grad): argument 67 def _RiscCastGrad(_, grad): argument 74 def _RiscCholeskyGrad(_, grad): argument 81 def _RiscCeilGrad(_, grad): argument 88 def _RiscConcatGrad(_, grad): argument [all …]
|
/external/tensorflow/tensorflow/python/ops/ |
D | math_grad.py | 41 def _ArgMaxGrad(op, grad): argument 42 del op, grad 47 def _ArgMinGrad(op, grad): argument 48 del op, grad 53 def _EuclideanNormGrad(op, grad): argument 62 grad = array_ops.reshape(grad, output_shape_kept_dims) 64 return math_ops.truediv(op.inputs[0], output / grad), None 67 def SmartBroadcastGradientArgs(x, y, grad): argument 93 and isinstance(grad, ops.Tensor)): 102 grad_shape_tuple = grad._shape_tuple() [all …]
|
D | array_grad.py | 42 def _PackGrad(op, grad): argument 44 return array_ops.unstack(grad, num=op.get_attr("N"), axis=op.get_attr("axis")) 53 def _ConcatGradHelper(op, grad, start_value_index, end_value_index, dim_index): argument 107 return grad + [None] if end_value_index <= dim_index else [None] + grad 113 if isinstance(grad, ops.Tensor): 122 out_grads = array_ops.split(grad, sizes, non_neg_concat_dim) 131 grad_context = control_flow_util.GetOutputContext(grad.op) 153 out_grads = array_ops.split(grad, sizes, non_neg_concat_dim) 157 out_grads.append(array_ops.slice(grad, begin, size)) 158 elif isinstance(grad, ops.IndexedSlices): [all …]
|
D | control_flow_grad.py | 35 def _SwitchGrad(op, *grad): argument 54 if grad[1] is not None: 56 control_flow_ops._AddNextAndBackEdge(merge_grad, grad[1], 60 elif grad[0] is not None: 65 merge_grad = merge([grad[0], grad[0]], name="b_switch")[0] 74 zero_grad = grad[1 - op_ctxt.branch] 82 [grad[op_ctxt.branch]] * 2, name="cond_resource_grad")[0], None 84 return merge(grad, name="cond_grad")[0], None 86 false_grad = switch(grad[0], op.inputs[1])[0] 87 true_grad = switch(grad[1], op.inputs[1])[1] [all …]
|
D | nn_grad.py | 31 def _Conv2DBackpropInputGrad(op, grad): argument 46 grad, 56 grad, 68 def _Conv2DBackpropFilterGrad(op, grad): argument 74 grad, 84 grad, 95 def _DepthwiseConv2dNativeBackpropInputGrad(op, grad): argument 108 grad, 117 grad, 128 def _DepthwiseConv2dNativeBackpropFilterGrad(op, grad): argument [all …]
|
D | tensor_array_grad.py | 87 def _TensorArrayReadGrad(op, grad): argument 107 grad_source = _GetGradSource(grad) 110 .grad(source=grad_source, flow=flow)) 111 w_g = g.write(index, grad) 142 .grad(source=grad_source, flow=flow)) 143 grad = g.read(index) 144 return [None, None, grad, flow] 150 def _TensorArrayGatherGrad(op, grad): argument 170 grad_source = _GetGradSource(grad) 173 .grad(source=grad_source, flow=flow)) [all …]
|
D | image_grad.py | 29 def _ResizeNearestNeighborGrad(op, grad): argument 46 grad, 54 def _ResizeBilinearGrad(op, grad): argument 65 grad, 73 def _ScaleAndTranslateGrad(op, grad): argument 85 grad, 95 def _ResizeBicubicGrad(op, grad): argument 109 grad, 117 def _CropAndResizeGrad(op, grad): argument 141 grad, op.inputs[1], op.inputs[2], image_shape, T=op.get_attr("T"), [all …]
|
D | sparse_grad.py | 149 def _SparseTensorDenseMatMulGrad(op, grad): argument 182 a_indices, a_values, a_shape, grad, adjoint_a=not adj_a) 195 parts_a = array_ops.gather(grad, rows if not adj_a else cols) 210 def _SparseDenseCwiseMulOrDivGrad(op, grad, is_mul): argument 230 dx = grad * dense_vals 231 dy_val = grad * op.inputs[1] 233 dx = grad / dense_vals 234 dy_val = grad * (-op.inputs[1] / math_ops.square(dense_vals)) 245 def _SparseDenseCwiseMulGrad(op, grad): argument 247 return _SparseDenseCwiseMulOrDivGrad(op, grad, True) [all …]
|
/external/tensorflow/tensorflow/python/ops/linalg/sparse/ |
D | sparse_csr_matrix_grad.py | 28 def _DenseToCSRSparseMatrixGrad(op, grad): argument 32 grad, type=op.get_attr("T"))) 38 def _CSRSparseMatrixToDenseGrad(op, grad): argument 42 grad, array_ops.stop_gradient(array_ops.where(math_ops.abs(grad) > 0))) 51 def _SparseMatrixAddGrad(op, grad): argument 66 return (sparse_csr_matrix_ops.sparse_matrix_mul(grad, alpha), 67 sparse_csr_matrix_ops.sparse_matrix_mul(grad, beta), None, None) 71 def _SparseMatrixTransposeGrad(op, grad): argument 74 grad, type=op.get_attr("type"), conjugate=op.get_attr("conjugate")) 86 def _SparseMatrixMatMulGrad(op, grad): argument [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/ |
D | decompose_resource_ops.td | 82 // accum = accum * momentum + grad; 87 $var_resource, $accum_resource, $lr, $grad, $momentum, 92 (CreateTFReadVariableOp $src_op, $grad, $accum_resource), 95 $grad 104 // accum = accum * momentum + grad; 105 // var -= grad * lr + accum * momentum * lr 109 $var_resource, $accum_resource, $lr, $grad, $momentum, 114 (CreateTFReadVariableOp $src_op, $grad, $accum_resource), 117 $grad 123 (TF_MulOp $grad, $lr), [all …]
|
/external/tensorflow/tensorflow/python/training/ |
D | rmsprop.py | 144 def _apply_dense(self, grad, var): argument 158 grad, 169 grad, 172 def _resource_apply_dense(self, grad, var): argument 182 math_ops.cast(self._learning_rate_tensor, grad.dtype.base_dtype), 183 math_ops.cast(self._decay_tensor, grad.dtype.base_dtype), 184 math_ops.cast(self._momentum_tensor, grad.dtype.base_dtype), 185 math_ops.cast(self._epsilon_tensor, grad.dtype.base_dtype), 186 grad, 193 math_ops.cast(self._learning_rate_tensor, grad.dtype.base_dtype), [all …]
|
D | training_ops_test.py | 73 def _testTypesForAdagrad(self, x, y, lr, grad, use_gpu=None): argument 81 apply_adagrad = training_ops.apply_adagrad(var, accum, lr, grad) 84 self.assertAllCloseAccordingToType(x - lr * grad * (y + grad * grad)** 86 self.assertAllCloseAccordingToType(y + grad * grad, self.evaluate(accum)) 93 grad, argument 106 apply_ftrl = training_ops.apply_ftrl(var, accum, linear, grad, lr, l1, l2, 110 accum_update = y + grad * grad 111 linear_update = z + grad - (accum_update**(-lr_power) - y** 138 grad, argument 156 grad, [all …]
|
D | ftrl.py | 162 def _apply_dense(self, grad, var): argument 170 grad, 183 grad, 194 def _resource_apply_dense(self, grad, var): argument 202 grad, 215 grad, 226 def _apply_sparse(self, grad, var): argument 234 grad.values, 235 grad.indices, 248 grad.values, [all …]
|
D | proximal_gradient_descent.py | 64 def _apply_dense(self, grad, var): argument 70 grad, 73 def _resource_apply_dense(self, grad, var): argument 79 grad, 82 def _apply_sparse(self, grad, var): argument 88 grad.values, 89 grad.indices, 92 def _resource_apply_sparse(self, grad, var, indices): argument 95 math_ops.cast(self._learning_rate_tensor, grad.dtype), 96 math_ops.cast(self._l1_regularization_strength_tensor, grad.dtype), [all …]
|
D | gradient_descent.py | 55 def _apply_dense(self, grad, var): argument 59 grad, 62 def _resource_apply_dense(self, grad, handle): argument 65 grad.dtype.base_dtype), 66 grad, use_locking=self._use_locking) 68 def _resource_apply_sparse_duplicate_indices(self, grad, handle, indices): argument 70 handle.handle, indices, -grad * self._learning_rate) 72 def _apply_sparse_duplicate_indices(self, grad, var): argument 74 grad.values * 76 grad.indices, grad.dense_shape)
|
D | adadelta.py | 83 def _apply_dense(self, grad, var): argument 93 grad, 96 def _resource_apply_dense(self, grad, var): argument 103 math_ops.cast(self._lr_t, grad.dtype.base_dtype), 104 math_ops.cast(self._rho_t, grad.dtype.base_dtype), 105 math_ops.cast(self._epsilon_t, grad.dtype.base_dtype), 106 grad, 109 def _apply_sparse(self, grad, var): argument 119 grad.values, 120 grad.indices, [all …]
|
D | momentum.py | 100 def _apply_dense(self, grad, var): argument 105 grad, 110 def _resource_apply_dense(self, grad, var): argument 114 math_ops.cast(self._learning_rate_tensor, grad.dtype.base_dtype), 115 grad, 116 math_ops.cast(self._momentum_tensor, grad.dtype.base_dtype), 120 def _apply_sparse(self, grad, var): argument 125 grad.values, grad.indices, 130 def _resource_apply_sparse(self, grad, var, indices): argument 134 math_ops.cast(self._learning_rate_tensor, grad.dtype), [all …]
|
D | proximal_adagrad.py | 94 def _apply_dense(self, grad, var): argument 100 grad, use_locking=self._use_locking) 102 def _resource_apply_dense(self, grad, var): argument 108 grad, use_locking=self._use_locking) 110 def _apply_sparse(self, grad, var): argument 116 grad.values, grad.indices, 119 def _resource_apply_sparse(self, grad, var, indices): argument 123 math_ops.cast(self._learning_rate_tensor, grad.dtype), 124 math_ops.cast(self._l1_regularization_strength_tensor, grad.dtype), 125 math_ops.cast(self._l2_regularization_strength_tensor, grad.dtype), [all …]
|
D | adagrad_da.py | 111 def _apply_dense(self, grad, var): argument 120 grad, 127 def _resource_apply_dense(self, grad, var): argument 136 grad, 137 math_ops.cast(self._learning_rate_tensor, grad.dtype.base_dtype), 138 math_ops.cast(self._l1_regularization_strength, grad.dtype.base_dtype), 139 math_ops.cast(self._l2_regularization_strength, grad.dtype.base_dtype), 143 def _apply_sparse(self, grad, var): argument 152 grad.values, 153 grad.indices, [all …]
|
D | adam.py | 152 def _apply_dense(self, grad, var): argument 166 grad, 169 def _resource_apply_dense(self, grad, var): argument 177 math_ops.cast(beta1_power, grad.dtype.base_dtype), 178 math_ops.cast(beta2_power, grad.dtype.base_dtype), 179 math_ops.cast(self._lr_t, grad.dtype.base_dtype), 180 math_ops.cast(self._beta1_t, grad.dtype.base_dtype), 181 math_ops.cast(self._beta2_t, grad.dtype.base_dtype), 182 math_ops.cast(self._epsilon_t, grad.dtype.base_dtype), 183 grad, [all …]
|
/external/tensorflow/tensorflow/python/ops/signal/ |
D | fft_ops.py | 204 def _fft_size_for_grad(grad, rank): argument 205 return _math_ops.reduce_prod(_array_ops.shape(grad)[-rank:]) 209 def _fft_grad(_, grad): argument 210 size = _math_ops.cast(_fft_size_for_grad(grad, 1), grad.dtype) 211 return ifft(grad) * size 215 def _ifft_grad(_, grad): argument 217 1. / _math_ops.cast(_fft_size_for_grad(grad, 1), grad.dtype.real_dtype), 218 grad.dtype) 219 return fft(grad) * rsize 223 def _fft2d_grad(_, grad): argument [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/tfr/examples/mnist/ |
D | ops_defs.py | 77 def _conv_add_relu_grad(op, grad): argument 81 grad = gen_nn_ops.relu_grad(grad, y) 83 grad = gen_nn_ops.relu6_grad(grad, y) 86 grad = gen_math_ops.tanh_grad(y, grad) 93 grad, axis=reduction_axes, keepdims=True) 104 grad, 112 grad, 141 def _fully_connected_grad(op, grad): argument 145 grad = gen_nn_ops.relu_grad(grad, y) 147 grad = gen_nn_ops.relu6_grad(grad, y) [all …]
|
/external/tensorflow/tensorflow/core/kernels/ |
D | training_ops_gpu.cu.cc | 115 T* var, T* accum, const T* lr, const T* epsilon, const T* grad, in SparseApplyAdagradKernel() argument 133 T grad_i = grad[grad_index]; in SparseApplyAdagradKernel() 154 T* var, T* accum, const T* lr, const T* l1, const T* l2, const T* grad, in SparseApplyProximalAdagradKernel() argument 172 T grad_i = grad[grad_index]; in SparseApplyProximalAdagradKernel() 196 const T* grad, const Tindex* indices, in SparseApplyFtrlKernel() argument 216 const T grad_i = grad[grad_index]; in SparseApplyFtrlKernel() 262 const T* const beta2_, const T* const epsilon_, const T* grad, in ApplyAdamKernel() argument 280 auto g_i = grad[i]; in ApplyAdamKernel() 299 T* var, T* accum, const T* lr, const T* grad, const Tindex* indices, in SparseApplyKerasMomentumKernel() argument 317 T grad_i = grad[grad_index]; in SparseApplyKerasMomentumKernel() [all …]
|
/external/skia/tests/ |
D | ShaderOpacityTest.cpp | 61 auto grad = SkGradientShader::MakeLinear(pts, colors, pos, count, mode); in test_gradient() local 62 REPORTER_ASSERT(reporter, grad); in test_gradient() 63 REPORTER_ASSERT(reporter, grad->isOpaque()); in test_gradient() 68 grad = SkGradientShader::MakeLinear(pts, colors, pos, count, mode); in test_gradient() 69 REPORTER_ASSERT(reporter, grad); in test_gradient() 70 REPORTER_ASSERT(reporter, !grad->isOpaque()); in test_gradient() 75 grad = SkGradientShader::MakeLinear(pts, colors, pos, count, mode); in test_gradient() 76 REPORTER_ASSERT(reporter, grad); in test_gradient() 77 REPORTER_ASSERT(reporter, !grad->isOpaque()); in test_gradient() 82 grad = SkGradientShader::MakeLinear(pts, colors, pos, count, mode); in test_gradient() [all …]
|
/external/skqp/tests/ |
D | ShaderOpacityTest.cpp | 62 auto grad = SkGradientShader::MakeLinear(pts, colors, pos, count, mode); in test_gradient() local 63 REPORTER_ASSERT(reporter, grad); in test_gradient() 64 REPORTER_ASSERT(reporter, grad->isOpaque()); in test_gradient() 69 grad = SkGradientShader::MakeLinear(pts, colors, pos, count, mode); in test_gradient() 70 REPORTER_ASSERT(reporter, grad); in test_gradient() 71 REPORTER_ASSERT(reporter, !grad->isOpaque()); in test_gradient() 76 grad = SkGradientShader::MakeLinear(pts, colors, pos, count, mode); in test_gradient() 77 REPORTER_ASSERT(reporter, grad); in test_gradient() 78 REPORTER_ASSERT(reporter, !grad->isOpaque()); in test_gradient() 83 grad = SkGradientShader::MakeLinear(pts, colors, pos, count, mode); in test_gradient() [all …]
|