/external/tensorflow/tensorflow/python/framework/ |
dtypes_test.py | 15 """Tests for tensorflow.python.framework.dtypes.""" 24 from tensorflow.python.framework import dtypes 45 dtypes.DType(datatype_enum).as_datatype_enum) 51 dt = dtypes.as_dtype(datatype_enum) 58 dtype = dtypes.as_dtype(datatype_enum) 61 if dtype.base_dtype != dtypes.bfloat16: 64 dtypes.as_dtype(datatype_enum).base_dtype, 65 dtypes.as_dtype(numpy_dtype)) 69 dtypes.DType(types_pb2.DT_INVALID) 71 dtypes.as_dtype(types_pb2.DT_INVALID [all...] |
tensor_spec_test.py | 24 from tensorflow.python.framework import dtypes 36 self.assertEqual(desc.dtype, dtypes.float32) 39 desc = tensor_spec.TensorSpec(tensor_shape.TensorShape([1]), dtypes.float32) 43 desc = tensor_spec.TensorSpec(shape=None, dtype=dtypes.float32) 47 unknown = array_ops.placeholder(dtypes.int64) 48 partial = array_ops.placeholder(dtypes.int64, shape=[None, 1]) 49 full = array_ops.placeholder(dtypes.int64, shape=[2, 3]) 50 rank3 = array_ops.placeholder(dtypes.int64, shape=[4, 5, 6]) 52 desc_unknown = tensor_spec.TensorSpec(None, dtypes.int64) 58 desc_partial = tensor_spec.TensorSpec([2, None], dtypes.int64 [all...] |
/external/tensorflow/tensorflow/contrib/tpu/python/tpu/ |
tpu_infeed_test.py | 25 from tensorflow.python.framework import dtypes 39 tuple_types=[dtypes.float32, dtypes.int32, dtypes.int32]) 42 [dtypes.float32, dtypes.int32, dtypes.int32]) 60 number_of_tuple_elements=2, tuple_types=[dtypes.float32]) 71 i.set_tuple_types([dtypes.float32, dtypes.int32] [all...] |
/external/tensorflow/tensorflow/python/kernel_tests/ |
sparse_matmul_op_test.py | 24 from tensorflow.python.framework import dtypes 49 x_dtype=dtypes.float32, 50 y_dtype=dtypes.float32): 62 np_x = math_ops.cast(tf_x, dtypes.float32).eval() 63 np_y = math_ops.cast(tf_y, dtypes.float32).eval() 77 for x_dtype in (dtypes.float32, dtypes.bfloat16): 78 for y_dtype in (dtypes.float32, dtypes.bfloat16): 84 for x_dtype in (dtypes.float32, dtypes.bfloat16) [all...] |
stack_ops_test.py | 24 from tensorflow.python.framework import dtypes 38 -1, elem_type=dtypes.float32, stack_name="foo") 41 c1 = gen_data_flow_ops._stack_pop_v2(h, dtypes.float32) 51 x = constant_op.constant(a, dtype=dtypes.float32) 53 -1, elem_type=dtypes.float32, stack_name="foo") 56 c1 = gen_data_flow_ops._stack_pop_v2(h, dtypes.float32) 67 -1, elem_type=dtypes.float32, stack_name="foo") 74 a = constant_op.constant(np.ones(2000), dtype=dtypes.float32) 81 v = constant_op.constant(np.zeros(2000), dtype=dtypes.float32) 89 ny = y + gen_data_flow_ops._stack_pop_v2(h, dtypes.float32 [all...] |
scatter_nd_ops_test.py | 27 from tensorflow.python.framework import dtypes 149 indices = constant_op.constant([[4], [3], [1], [7]], dtype=dtypes.int32) 150 updates = constant_op.constant([9, 10, 11, 12], dtype=dtypes.float32) 151 ref = variables.Variable([0, 0, 0, 0, 0, 0, 0, 0], dtype=dtypes.float32) 162 indices = constant_op.constant([[4], [3], [1], [7]], dtype=dtypes.int32) 163 updates = constant_op.constant([9, 10, 11, 12], dtype=dtypes.float32) 165 [0, 0, 0, 0, 0, 0, 0, 0], dtype=dtypes.float32) 176 indices = constant_op.constant([[1, 0], [1, 1]], dtype=dtypes.int32) 177 updates = constant_op.constant([11., 12.], dtype=dtypes.float32) 179 [[0., 0.], [0., 0.], [0., 0.]], dtype=dtypes.float32 [all...] |
map_stage_op_test.py | 20 from tensorflow.python.framework import dtypes 35 x = array_ops.placeholder(dtypes.float32) 36 pi = array_ops.placeholder(dtypes.int64) 37 gi = array_ops.placeholder(dtypes.int64) 40 stager = data_flow_ops.MapStagingArea([dtypes.float32]) 56 x = array_ops.placeholder(dtypes.float32) 57 pi = array_ops.placeholder(dtypes.int64) 58 gi = array_ops.placeholder(dtypes.int64) 61 stager = data_flow_ops.MapStagingArea([dtypes.float32, dtypes.float32] [all...] |
aggregate_ops_test.py | 25 from tensorflow.python.framework import dtypes 42 return [dtypes.float16, dtypes.float32, dtypes.float64, dtypes.complex64, 43 dtypes.complex128] 44 return [dtypes.int8, dtypes.int16, dtypes.int32, dtypes.int64 [all...] |
py_func_test.py | 30 from tensorflow.python.framework import dtypes 54 x = constant_op.constant(1.0, dtypes.float32) 55 y = constant_op.constant(2.0, dtypes.float32) 56 z = self.evaluate(script_ops.py_func(np_func, [x, y], dtypes.float32)) 61 x = constant_op.constant(1.0, dtypes.float32) 62 y = constant_op.constant(2.0, dtypes.float32) 64 script_ops.eager_py_func(np_func, [x, y], [dtypes.float32])) 69 x = constant_op.constant([1.0, 2.0], dtypes.float64) 70 y = constant_op.constant([2.0, 3.0], dtypes.float64) 71 z = self.evaluate(script_ops.py_func(np_func, [x, y], [dtypes.float64]) [all...] |
variable_ops_test.py | 23 from tensorflow.python.framework import dtypes 35 np.float32: dtypes.float32, 36 np.float64: dtypes.float64, 37 np.int32: dtypes.int32, 38 np.int64: dtypes.int64, 66 p = state_ops.variable_op([1, 2], dtypes.float32) 68 p = state_ops.variable_op([1, 2], dtypes.float32, set_shape=False) 73 var = state_ops.variable_op(value.shape, dtypes.float32) 80 var = state_ops.variable_op(value.shape, dtypes.float32) 87 var = state_ops.variable_op(value.shape, dtypes.float32, set_shape=False [all...] |
init_ops_test.py | 25 from tensorflow.python.framework import dtypes 144 dtype=dtypes.int32, 147 self.assertEqual(x.dtype.base_dtype, dtypes.int32) 156 dtype=dtypes.int32, 159 self.assertEqual(x.dtype.base_dtype, dtypes.int32) 164 init = init_ops.constant_initializer(value, dtype=dtypes.int32) 188 init = init_ops.constant_initializer(value, dtype=dtypes.int32) 214 init = init_ops.constant_initializer(value, dtype=dtypes.int32) 234 init_ops.constant_initializer(c, dtype=dtypes.float32) 238 init_ops.constant_initializer(v, dtype=dtypes.float32 [all...] |
list_ops_test.py | 28 from tensorflow.python.framework import dtypes 39 return ops.convert_to_tensor([], dtype=dtypes.int32) 45 l = list_ops.empty_tensor_list(element_dtype=dtypes.float32, 48 l, e = list_ops.tensor_list_pop_back(l, element_dtype=dtypes.float32) 58 l = list_ops.empty_tensor_list(element_dtype=dtypes.float32, 62 t = list_ops.tensor_list_stack(l, element_dtype=dtypes.float32) 74 l, e = list_ops.tensor_list_pop_back(l, element_dtype=dtypes.float32) 76 l, e = list_ops.tensor_list_pop_back(l, element_dtype=dtypes.float32) 89 e0 = list_ops.tensor_list_get_item(l, 0, element_dtype=dtypes.float32) 92 t = list_ops.tensor_list_stack(l, element_dtype=dtypes.float32 [all...] |
/external/tensorflow/tensorflow/contrib/gan/python/features/python/ |
conditioning_utils_test.py | 23 from tensorflow.python.framework import dtypes 34 array_ops.placeholder(dtypes.float32, tensor_shape), 35 array_ops.placeholder(dtypes.float32, conditioning_shape)) 40 array_ops.placeholder(dtypes.float32, (4, 1)), 41 array_ops.placeholder(dtypes.float32, (5, 1))) 45 array_ops.placeholder(dtypes.float32, (5, None)), 46 array_ops.placeholder(dtypes.float32, (5, 1))) 50 array_ops.placeholder(dtypes.float32, (5, 2)), 51 array_ops.placeholder(dtypes.float32, (5))) 55 array_ops.placeholder(dtypes.float32, (5, 4, 1)) [all...] |
/external/tensorflow/tensorflow/python/kernel_tests/random/ |
random_ops_test.py | 25 from tensorflow.python.framework import dtypes 52 for dt in dtypes.float16, dtypes.float32, dtypes.float64: 67 for dt in dtypes.float16, dtypes.float32, dtypes.float64: 73 if dt == dtypes.float16: 79 for dt in dtypes.float16, dtypes.float32, dtypes.float64 [all...] |
random_gamma_test.py | 26 from tensorflow.python.framework import dtypes 57 self._testMoments(dtypes.float32) 60 self._testMoments(dtypes.float64) 86 if dt == dtypes.float64: 150 dtypes.float16: stats.gamma(alpha).cdf(np.finfo(np.float16).tiny), 151 dtypes.float32: stats.gamma(alpha).cdf(np.finfo(np.float32).tiny), 152 dtypes.float64: stats.gamma(alpha).cdf(np.finfo(np.float64).tiny) 156 for dt in dtypes.float16, dtypes.float32, dtypes.float64 [all...] |
/external/tensorflow/tensorflow/compiler/tests/ |
stack_ops_test.py | 24 from tensorflow.python.framework import dtypes 35 size = array_ops.placeholder(dtypes.int32) 36 v = array_ops.placeholder(dtypes.float32) 37 h = gen_data_flow_ops._stack_v2(size, dtypes.float32, stack_name="foo") 40 c1 = gen_data_flow_ops._stack_pop_v2(h, dtypes.float32) 46 x = array_ops.placeholder(dtypes.float32) 47 h = gen_data_flow_ops._stack_v2(5, dtypes.float32, stack_name="foo") 50 c1 = gen_data_flow_ops._stack_pop_v2(h, dtypes.float32) 55 v = array_ops.placeholder(dtypes.float32) 56 h1 = gen_data_flow_ops._stack_v2(5, dtypes.float32, stack_name="foo" [all...] |
/external/tensorflow/tensorflow/python/ops/ |
bitwise_ops_test.py | 25 from tensorflow.python.framework import dtypes 38 dtype_list = [dtypes.int8, dtypes.int16, dtypes.int32, dtypes.int64, 39 dtypes.uint8, dtypes.uint16, dtypes.uint32, dtypes.uint64] 54 dtype_list = [dtypes.int8, dtypes.int16 [all...] |
math_grad_test.py | 24 from tensorflow.python.framework import dtypes 68 if dtype in (dtypes.complex64, dtypes.complex128): 88 [3, 3], dtype=dtypes.float32, max_error=2e-5, bias=0.1, sigma=1.0) 90 [3, 3], dtype=dtypes.complex64, max_error=2e-5, bias=0.1, sigma=1.0) 94 [3, 3], dtype=dtypes.float32, max_error=100.0, bias=0.0, sigma=0.1) 96 [3, 3], dtype=dtypes.complex64, max_error=100.0, bias=0.0, sigma=0.1) 102 inputs = constant_op.constant([1.0], dtype=dtypes.float32) 109 inputs = constant_op.constant([1.0], dtype=dtypes.float32) 119 inputs = constant_op.constant([1.0, 2.0, 3.0, 4.0], dtype=dtypes.float32 [all...] |
dequantize_op_test.py | 24 from tensorflow.python.framework import dtypes 42 dtypes.quint8: np.uint8, 43 dtypes.qint8: np.int8, 44 dtypes.quint16: np.uint16, 45 dtypes.qint16: np.int16 63 self._testDequantizeOp(np.array([0, 128, 255]), 0.0, 6.0, dtypes.quint8) 64 self._testDequantizeOp(np.array([0, 128, 255]), 0.0, 123.456, dtypes.quint8) 66 np.array([0, 4, 42, 108, 243]), 5.0, 200.2, dtypes.quint8) 69 self._testDequantizeOp(np.array([-128, 0, 127]), -1.0, 2.0, dtypes.qint8) 70 self._testDequantizeOp(np.array([-2, 4, -17]), -5.0, -3.0, dtypes.qint8 [all...] |
/external/tensorflow/tensorflow/python/estimator/canned/ |
parsing_utils_test.py | 23 from tensorflow.python.framework import dtypes 35 'a': parsing_ops.FixedLenFeature((1,), dtype=dtypes.float32), 36 'b': parsing_ops.FixedLenFeature((1,), dtype=dtypes.int64), 44 label_dtype=dtypes.string) 46 'a': parsing_ops.FixedLenFeature((1,), dtype=dtypes.float32), 47 'b': parsing_ops.FixedLenFeature((1,), dtype=dtypes.string), 59 parsing_ops.FixedLenFeature((1,), dtype=dtypes.float32), 62 (1,), dtype=dtypes.int64, default_value=0), 72 'a': parsing_ops.FixedLenFeature((1,), dtype=dtypes.float32), 73 'b': parsing_ops.FixedLenFeature((1,), dtype=dtypes.int64) [all...] |
/external/tensorflow/tensorflow/contrib/data/python/kernel_tests/ |
sql_dataset_op_test.py | 26 from tensorflow.python.framework import dtypes 45 array_ops.constant("sqlite", dtypes.string), shape=[]) 46 self.query = array_ops.placeholder(dtypes.string, shape=[]) 97 init_op, get_next = self._createSqlDataset((dtypes.string, dtypes.string, 98 dtypes.string), 2) 115 init_op, get_next = self._createSqlDataset((dtypes.string, dtypes.string, 116 dtypes.string)) 134 init_op, get_next = self._createSqlDataset((dtypes.string, dtypes.string [all...] |
/external/tensorflow/tensorflow/contrib/metrics/python/metrics/ |
classification_test.py | 22 from tensorflow.python.framework import dtypes 31 pred = array_ops.placeholder(dtypes.int32, shape=[None]) 32 labels = array_ops.placeholder(dtypes.int32, shape=[None]) 41 pred = array_ops.placeholder(dtypes.bool, shape=[None]) 42 labels = array_ops.placeholder(dtypes.bool, shape=[None]) 51 pred = array_ops.placeholder(dtypes.int64, shape=[None]) 52 labels = array_ops.placeholder(dtypes.int64, shape=[None]) 61 pred = array_ops.placeholder(dtypes.string, shape=[None]) 62 labels = array_ops.placeholder(dtypes.string, shape=[None]) 72 pred = array_ops.placeholder(dtypes.int32, shape=[None] [all...] |
/external/tensorflow/tensorflow/contrib/lookup/ |
lookup_ops_test.py | 28 from tensorflow.python.framework import dtypes 47 values = constant_op.constant([0, 1, 2], dtypes.int64) 65 values = constant_op.constant([0, 1, 2], dtypes.int64) 86 keys, values, value_dtype=dtypes.int64), 119 values = constant_op.constant([0, 1, 2], dtypes.int64) 145 default_val = constant_op.constant(-1, dtypes.int64) 147 values = constant_op.constant([0, 1, 2], dtypes.int64) 160 default_val = constant_op.constant(-1, dtypes.int64) 162 values = constant_op.constant([0, 1, 2], dtypes.int64) 170 constant_op.constant(sp_indices, dtypes.int64) [all...] |
/external/tensorflow/tensorflow/tools/quantization/ |
quantize_graph_test.py | 28 from tensorflow.python.framework import dtypes 58 a_constant_name, value=a, dtype=dtypes.float32, shape=[m, k]) 61 b_constant_name, value=b, dtype=dtypes.float32, shape=[k, n]) 65 quantize_graph.set_attr_dtype(mat_mul_node, "T", dtypes.float32) 84 dtype=dtypes.float32, 90 dtype=dtypes.float32, 95 quantize_graph.set_attr_dtype(conv_node, "T", dtypes.float32) 203 shape_constant_name, value=-0.8, dtype=dtypes.float32, shape=[1]) 238 quantize_graph.set_attr_dtype(n, "T", dtypes.float32) 245 "input", value=[0, 1, 2, 3], dtype=dtypes.float32, shape=[4, 1] [all...] |
/external/tensorflow/tensorflow/python/data/util/ |
sparse_test.py | 24 from tensorflow.python.framework import dtypes 164 "types": dtypes.int32, 166 "expected": dtypes.int32 169 "types": dtypes.int32, 171 "expected": dtypes.variant 174 "types": (dtypes.int32), 176 "expected": (dtypes.int32) 179 "types": (dtypes.int32), 181 "expected": (dtypes.variant) 184 "types": (dtypes.int32, ()) [all...] |