/external/tensorflow/tensorflow/python/kernel_tests/ |
D | dynamic_stitch_op_test.py | 23 from tensorflow.python.framework import constant_op 41 indices = [constant_op.constant(0), constant_op.constant(1)] 42 data = [constant_op.constant(40), constant_op.constant(60)] 55 constant_op.constant(1) 57 data = [constant_op.constant(40), constant_op.constant(60)] 74 constant_op.constant([0, 4, 7]), 75 constant_op.constant([1, 6, 2, 3, 5]) 78 math_ops.cast(constant_op.constant([0, 40, 70]), dtype=dtype), 80 constant_op.constant([10, 60, 20, 30, 50]), dtype=dtype) 89 indices = [constant_op.constant([1, 6, 2, 3, 5, 0, 4, 7])] [all …]
|
D | map_ops_test.py | 22 from tensorflow.python.framework import constant_op 43 k = constant_op.constant(1.0) 44 v = constant_op.constant(2.0) 51 k = constant_op.constant(1.0) 52 v = constant_op.constant(2.0) 59 k = constant_op.constant(1.0) 67 k = constant_op.constant(1.0) 68 k2 = constant_op.constant(2.0) 69 v = constant_op.constant(11.0) 78 k = constant_op.constant(1.0) [all …]
|
D | losses_test.py | 23 from tensorflow.python.framework import constant_op 46 self._predictions = constant_op.constant([4, 8, 12, 8, 1, 3], shape=(2, 3)) 47 self._labels = constant_op.constant([1, 9, 2, -5, -2, 6], shape=(2, 3)) 74 constant_op.constant(weights)) 79 weights = constant_op.constant((1.2, 0.0), shape=(2, 1)) 85 weights = constant_op.constant([1.2, 0.0], shape=[2, 1]) 91 weights = constant_op.constant([3, 6, 5, 0, 4, 2], shape=[2, 3]) 97 weights = constant_op.constant([0, 0, 0, 0, 0, 2], shape=[2, 3]) 112 predictions = constant_op.constant([4, 8, 12, 8, 1, 3], shape=(2, 3)) 113 labels = constant_op.constant([1, 9, 2, -5, -2, 6], shape=(2, 3)) [all …]
|
D | clip_ops_test.py | 23 from tensorflow.python.framework import constant_op 39 inputs = constant_op.constant([1.0, 2.0, 3.0, 4.0], dtype=dtypes.float32) 41 min_val = constant_op.constant([0.5, 0.5, 0.5, 0.5], dtype=dtypes.float32) 42 max_val = constant_op.constant([3.5, 3.5, 3.5, 3.5], dtype=dtypes.float32) 56 x = constant_op.constant([-5.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3]) 77 x = constant_op.constant([1, 2, 3, 4, 5, 6], shape=[2, 3], dtype=dtype) 99 x = constant_op.constant([1, 2, 3, 4, 5, 6], shape=[2, 3], dtype=dtype) 101 clip_value_min = constant_op.constant( 122 x = constant_op.constant([1, 2, 3, 4, 5, 6], shape=[2, 3], dtype=dtype) 125 clip_value_max = constant_op.constant( [all …]
|
D | check_ops_test.py | 30 from tensorflow.python.framework import constant_op 50 c1 = constant_op.constant(-1, name="minus_one", dtype=dtypes.int32) 51 c2 = constant_op.constant(2, name="two", dtype=dtypes.int32) 52 c3 = constant_op.constant([3., 3.], name="three", dtype=dtypes.float32) 53 c4 = constant_op.constant([3., 3.5], name="three_and_a_half", 112 tensor = constant_op.constant(1) 144 constant_op.constant([11, 22]), constant_op.constant([1, 2]) 150 generator_of_stuff = (constant_op.constant([11, 22]), constant_op.constant( 159 small = constant_op.constant([1, 2], name="small") 166 const_true = constant_op.constant(True, name="true") [all …]
|
D | lookup_ops_test.py | 36 from tensorflow.python.framework import constant_op 84 keys = constant_op.constant(["brain", "salad", "surgery"]) 85 values = constant_op.constant([0, 1, 2], dtypes.int64) 92 input_string = constant_op.constant(["brain", "salad", "tank"]) 107 keys = constant_op.constant(["brain", "salad", "surgery"]) 108 values = constant_op.constant([0, 1, 2], dtypes.int64) 115 input_string = constant_op.constant([["brain", "salad"], 133 input_string = constant_op.constant(["brain", "salad", "tank"]) 149 input_string = constant_op.constant(["brain", "salad", "tank"]) 157 keys = constant_op.constant(["brain", "salad", "surgery"]) [all …]
|
D | cond_v2_test.py | 30 from tensorflow.python.framework import constant_op 100 x = constant_op.constant(1.0, name="x") 101 y = constant_op.constant(2.0, name="y") 116 pred = constant_op.constant(True) 118 return math_ops._as_indexed_slices(constant_op.constant([1.])), None 120 return math_ops._as_indexed_slices(constant_op.constant([2.])), None 131 pred = constant_op.constant(True) 135 math_ops._as_indexed_slices(constant_op.constant([1.]))) 139 math_ops._as_indexed_slices(constant_op.constant([2.]))) 167 x = constant_op.constant(1.0, name="x") [all …]
|
D | concat_op_test.py | 23 from tensorflow.python.framework import constant_op 91 x1 = constant_op.constant(p1) 92 x2 = constant_op.constant(p2) 173 a = variables.Variable(constant_op.constant(1.0, shape=[1])) 174 b = variables.Variable(constant_op.constant(2.0, shape=[1])) 188 array_ops.concat(1, constant_op.constant(0, shape=[])) 191 array_ops.concat(1, constant_op.constant(0, shape=[1])) 207 constant_op.constant( 216 grad_tensor = constant_op.constant( 238 constant_op.constant( [all …]
|
/external/tensorflow/tensorflow/python/eager/ |
D | forwardprop_test.py | 34 from tensorflow.python.framework import constant_op 230 add_outputs = (constant_op.constant(4.),) 234 inputs=(constant_op.constant(1.), constant_op.constant(3.)), 237 constant_op.constant(1.), 238 constant_op.constant(5.), 242 mul_outputs = (constant_op.constant([20.]),) 246 inputs=(constant_op.constant([4.]), constant_op.constant([5.])), 249 constant_op.constant([2.]), 250 constant_op.constant([3.]), 255 add_outputs = (constant_op.constant(4.),) [all …]
|
D | ops_test.py | 31 from tensorflow.python.framework import constant_op 49 three = constant_op.constant(3) 50 five = constant_op.constant(5) 56 three = constant_op.constant([[3.]]).gpu() 57 five = constant_op.constant([[5.]]).gpu() 62 three = constant_op.constant(3.0) 68 three = constant_op.constant(3.0) 69 almost_three = constant_op.constant(2.8) 75 three = constant_op.constant(3) 76 four = constant_op.constant(4) [all …]
|
D | device_placement_test.py | 28 from tensorflow.python.framework import constant_op 49 a = constant_op.constant(1) 50 b = constant_op.constant(2) 59 a = constant_op.constant(1) 60 b = constant_op.constant(2) 61 s = constant_op.constant(list('hello world')) 70 a = constant_op.constant(1) 71 b = constant_op.constant(2) 80 a = constant_op.constant(1) 81 b = constant_op.constant(2) [all …]
|
D | core_test.py | 37 from tensorflow.python.framework import constant_op 115 constant_a = constant_op.constant(1.0) 116 constant_b = constant_op.constant(1.0) 166 constant_a = constant_op.constant(float('nan')) 167 constant_b = constant_op.constant(float('nan')) 200 tf_a = constant_op.constant([1, 2]) 201 tf_b = constant_op.constant([1, 2]) 202 tf_c = constant_op.constant([1, 1]) 264 constant_op.constant(1) == constant_op.constant(1), True) 266 constant_op.constant(1) == constant_op.constant(2), False) [all …]
|
/external/tensorflow/tensorflow/python/keras/ |
D | losses_test.py | 26 from tensorflow.python.framework import constant_op 197 y_true = constant_op.constant([[1., 9.], [2., 5.]]) 198 y_pred = constant_op.constant([[4., 8.], [12., 3.]]) 199 sample_weight = constant_op.constant([1.2, 0.5]) 221 y_true = constant_op.constant([[1., 9.], [2., 5.]]) 222 y_pred = constant_op.constant([[4., 8.], [12., 3.]]) 223 sample_weight = constant_op.constant([1.2, 0.5]) 242 y = constant_op.constant([1]) 253 logits = constant_op.constant([[-30., 30.]]) 256 y_true = constant_op.constant([[0., 1.]]) [all …]
|
D | metrics_confusion_matrix_test.py | 27 from tensorflow.python.framework import constant_op 59 y_true = constant_op.constant(((0, 1, 0, 1, 0), (0, 0, 1, 1, 1), 61 y_pred = constant_op.constant(((0, 0, 1, 1, 0), (1, 1, 1, 1, 1), 72 y_true = constant_op.constant(((0, 1, 0, 1, 0), (0, 0, 1, 1, 1), 74 y_pred = constant_op.constant(((0, 0, 1, 1, 0), (1, 1, 1, 1, 1), 76 sample_weight = constant_op.constant((1., 1.5, 2., 2.5)) 84 y_pred = constant_op.constant(((0.9, 0.2, 0.8, 0.1), (0.2, 0.9, 0.7, 0.6), 86 y_true = constant_op.constant(((0, 1, 1, 0), (1, 0, 0, 0), (0, 0, 0, 0), 98 y_pred = constant_op.constant(((0.9, 0.2, 0.8, 0.1), (0.2, 0.9, 0.7, 0.6), 100 y_true = constant_op.constant(((0, 1, 1, 0), (1, 0, 0, 0), (0, 0, 0, 0), [all …]
|
/external/tensorflow/tensorflow/python/autograph/converters/ |
D | control_flow_test.py | 31 from tensorflow.python.framework import constant_op 78 self.assertTransformedResult(f, constant_op.constant(5), 97 self.assertTransformedResult(f, constant_op.constant(5), 123 n, tc = tr(constant_op.constant(5)) 139 self.assertTransformedResult(f, constant_op.constant(5), (10, 5, 5)) 148 self.assertTransformedResult(f, constant_op.constant(5), 0) 155 self.x = constant_op.constant(3) 164 self.assertTransformedResult(f, constant_op.constant(5), 0) 176 self.assertTransformedResult(f, constant_op.constant(5), (10, 0)) 187 self.assertTransformedResult(f, constant_op.constant(5), (10, 0)) [all …]
|
/external/tensorflow/tensorflow/python/ops/ |
D | math_grad_test.py | 26 from tensorflow.python.framework import constant_op 50 left_tensor = constant_op.constant(l, shape=left_shape) 51 right_tensor = constant_op.constant(r, shape=right_shape) 111 inputs = constant_op.constant([1.0], dtype=dtypes.float32) 119 inputs = constant_op.constant([1.0], dtype=dtypes.float32) 130 inputs = constant_op.constant([1.0, 2.0, 3.0, 4.0], dtype=dtypes.float32) 138 inputs = constant_op.constant([1.0, 2.0, 3.0, 4.0], dtype=dtypes.float32) 149 inputs = constant_op.constant([[1., 2.], [3., 4.]], 160 inputs = constant_op.constant([[1., 2.], [3., 4.]], 172 inputs = constant_op.constant([[1 + 3j, 2 - 1j], [3j, 4]], [all …]
|
/external/tensorflow/tensorflow/python/framework/ |
D | smart_cond_test.py | 21 from tensorflow.python.framework import constant_op 42 x = constant_op.constant(2) 43 y = constant_op.constant(5) 52 x = constant_op.constant(4) 53 y = constant_op.constant(3) 62 y = smart_cond.smart_cond(x > 0, lambda: constant_op.constant(1), 63 lambda: constant_op.constant(2)) 70 x = constant_op.constant(1) 71 y = constant_op.constant(2) 74 z = smart_cond.smart_cond(x * y > 0, lambda: constant_op.constant(1), [all …]
|
/external/tensorflow/tensorflow/python/saved_model/model_utils/ |
D | export_output_test.py | 25 from tensorflow.python.framework import constant_op 211 'output0': constant_op.constant([0]), 212 u'output1': constant_op.constant(['foo']), 217 export_output_lib.PredictOutput(constant_op.constant([0])) 222 export_output_lib.PredictOutput({1: constant_op.constant([0])}) 244 loss = {'my_loss': constant_op.constant([0])} 245 predictions = {u'output1': constant_op.constant(['foo'])} 246 mean, update_op = metrics_module.mean_tensor(constant_op.constant([0])) 249 'metrics2': (constant_op.constant([0]), constant_op.constant([10])) 272 constant_op.constant([0]), None, None) [all …]
|
/external/tensorflow/tensorflow/python/data/experimental/kernel_tests/ |
D | make_csv_dataset_test.py | 32 from tensorflow.python.framework import constant_op 133 constant_op.constant([], dtypes.int32), 134 constant_op.constant([], dtypes.int64), 135 constant_op.constant([], dtypes.float32), 136 constant_op.constant([], dtypes.float64), 137 constant_op.constant([], dtypes.string) 165 constant_op.constant([], dtypes.int32), 166 constant_op.constant([], dtypes.int64), 167 constant_op.constant([], dtypes.float32), 168 constant_op.constant([], dtypes.float64), [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/tfr/integration/ |
D | graph_decompose_test.py | 24 from tensorflow.python.framework import constant_op 40 t1 = constant_op.constant([[1.0, 2.0], [3.0, 4.0]]) 41 t2 = constant_op.constant([[1.0, 2.0], [3.0, 4.0]]) 42 t3 = constant_op.constant([[1.0, 2.0], [3.0, 4.0]]) 52 t1 = constant_op.constant([[1.0, 2.0], [3.0, 4.0]]) 53 t2 = constant_op.constant([[1.0, 2.0], [3.0, 4.0]]) 54 t3 = constant_op.constant([[-10.0, -10.0], [-10.0, -10.0]]) 60 t1 = constant_op.constant([[1.0, 2.0], [3.0, 4.0]]) 61 t2 = constant_op.constant([[1.0, 2.0], [3.0, 4.0]]) 62 t3 = constant_op.constant([[-10.0, -10.0], [-10.0, -10.0]]) [all …]
|
D | node_expansion_test.py | 23 from tensorflow.python.framework import constant_op 40 t1 = constant_op.constant([[1.0, 2.0], [3.0, 4.0]]) 41 t2 = constant_op.constant([[1.0, 2.0], [3.0, 4.0]]) 42 t3 = constant_op.constant([[1.0, 2.0], [3.0, 4.0]]) 51 t1 = constant_op.constant([[1.0, 2.0], [3.0, 4.0]]) 52 t2 = constant_op.constant([[1.0, 2.0], [3.0, 4.0]]) 53 t3 = constant_op.constant([[-10.0, -10.0], [-10.0, -10.0]]) 58 t1 = constant_op.constant([[1.0, 2.0], [3.0, 4.0]]) 59 t2 = constant_op.constant([[1.0, 2.0], [3.0, 4.0]]) 60 t3 = constant_op.constant([[-10.0, -10.0], [-10.0, -10.0]]) [all …]
|
/external/tensorflow/tensorflow/python/data/util/ |
D | structure_test.py | 31 from tensorflow.python.framework import constant_op 58 ("Tensor", lambda: constant_op.constant(37.0), tensor_spec.TensorSpec, 69 lambda: (constant_op.constant(37.0), constant_op.constant([1, 2, 3])), 72 "a": constant_op.constant(37.0), 73 "b": constant_op.constant([1, 2, 3]) 77 constant_op.constant(37.0), 101 ("Tensor", lambda: constant_op.constant(37.0), lambda: [ 102 constant_op.constant(38.0), 106 ], lambda: [constant_op.constant([1.0, 2.0]), 107 constant_op.constant(37)]), [all …]
|
/external/tensorflow/tensorflow/python/debug/lib/ |
D | debug_v2_ops_test.py | 31 from tensorflow.python.framework import constant_op 146 counter = constant_op.constant(0, dtype=dtypes.int32) 162 x = constant_op.constant(10, dtype=dtypes.int32) 298 debug_summary(constant_op.constant([])), [0.0, 0.0, 0.0]) 300 debug_summary(constant_op.constant(42.0)), [0.0, 0.0, 0.0]) 302 debug_summary(constant_op.constant([3.0, 4.0])), [0.0, 0.0, 0.0]) 304 debug_summary(constant_op.constant(np.array([3.0, -np.inf]))), 307 debug_summary(constant_op.constant(np.array([[0, 0], [np.nan, 0]]))), 311 constant_op.constant(np.array([[0, 0], [np.nan, np.inf]]))), 315 constant_op.constant(np.array([[0, np.inf], [np.nan, -np.inf]]))), [all …]
|
/external/tensorflow/tensorflow/python/compiler/tensorrt/test/ |
D | concatenation_test.py | 24 from tensorflow.python.framework import constant_op 38 a = constant_op.constant(np.random.randn(3, 1, 1), dtype=dtype) 40 a = constant_op.constant(np.random.randn(3, 1, 1), dtype=dtype) 42 a = constant_op.constant(np.random.randn(1, 3, 1), dtype=dtype) 44 a = constant_op.constant(np.random.randn(1, 3, 1), dtype=dtype) 46 a = constant_op.constant(np.random.randn(3, 1, 1), dtype=dtype) 48 a = constant_op.constant(np.random.randn(3, 1, 1), dtype=dtype) 50 a = constant_op.constant(np.random.randn(3, 1), dtype=dtype) 52 a = constant_op.constant(np.random.randn(3, 1), dtype=dtype) 54 a = constant_op.constant(np.random.randn(3, 1, 1), dtype=dtype) [all …]
|
/external/tensorflow/tensorflow/python/kernel_tests/array_ops/ |
D | scatter_nd_ops_test.py | 28 from tensorflow.python.framework import constant_op 167 indices = constant_op.constant([[4], [3], [1], [7]], dtype=dtypes.int32) 170 updates = constant_op.constant([9, 10, 11, 12], dtype=dtype) 184 indices = constant_op.constant([[4], [3], [1], [7]]) 185 updates = constant_op.constant(["aa", "dd", "cc", "bb"]) 192 indices = constant_op.constant([[4], [3], [1], [7]], dtype=dtypes.int32) 194 updates = constant_op.constant([9, 10, 11, 12], dtype=dtype) 206 indices = constant_op.constant([[1, 0], [1, 1]], dtype=dtypes.int32) 207 updates = constant_op.constant([11., 12.], dtype=dtypes.float32) 220 indices = constant_op.constant([[1]], dtype=dtypes.int32) [all …]
|