Home
last modified time | relevance | path

Searched refs:dtypes (Results 1 – 25 of 1303) sorted by relevance

12345678910>>...53

/external/tensorflow/tensorflow/python/framework/
Ddtypes_test.py25 from tensorflow.python.framework import dtypes
46 dtypes.DType(datatype_enum).as_datatype_enum)
52 dt = dtypes.as_dtype(datatype_enum)
59 dtype = dtypes.as_dtype(datatype_enum)
62 if dtype.base_dtype != dtypes.bfloat16:
65 dtypes.as_dtype(datatype_enum).base_dtype,
66 dtypes.as_dtype(numpy_dtype))
73 self.assertEqual(dtypes.as_dtype(datatype_enum), dtype)
77 dtypes.DType(types_pb2.DT_INVALID)
79 dtypes.as_dtype(types_pb2.DT_INVALID)
[all …]
Dtype_spec_test.py29 from tensorflow.python.framework import dtypes
61 self.x_dtype = dtypes.as_dtype(x_dtype)
63 self.y_dtype = dtypes.as_dtype(y_dtype)
197 TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool),
198 TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool)),
200 TwoTensorsSpec([5, None], dtypes.int32, [None], dtypes.bool),
201 TwoTensorsSpec([5, None], dtypes.int32, [None], dtypes.bool)),
203 TwoTensorsSpec(None, dtypes.int32, None, dtypes.bool),
204 TwoTensorsSpec(None, dtypes.int32, None, dtypes.bool)),
206 TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool, "blue"),
[all …]
Dconstant_op_test.py24 from tensorflow.python.framework import dtypes
32 dtypes.bfloat16,
33 dtypes.complex128,
34 dtypes.complex64,
35 dtypes.double,
36 dtypes.float16,
37 dtypes.float32,
38 dtypes.float64,
39 dtypes.half,
40 dtypes.int16,
[all …]
Dtensor_spec_test.py27 from tensorflow.python.framework import dtypes
41 self.assertEqual(desc.dtype, dtypes.float32)
45 self.assertEqual(desc.dtype, dtypes.float32)
48 desc = tensor_spec.TensorSpec(tensor_shape.TensorShape([1]), dtypes.float32)
52 desc = tensor_spec.TensorSpec(shape=None, dtype=dtypes.float32)
58 unknown = array_ops.placeholder(dtypes.int64)
59 partial = array_ops.placeholder(dtypes.int64, shape=[None, 1])
60 full = array_ops.placeholder(dtypes.int64, shape=[2, 3])
61 rank3 = array_ops.placeholder(dtypes.int64, shape=[4, 5, 6])
63 desc_unknown = tensor_spec.TensorSpec(None, dtypes.int64)
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/random/
Drandom_ops_test.py25 from tensorflow.python.framework import dtypes
82 for dt in dtypes.float16, dtypes.float32, dtypes.float64:
98 for dt in dtypes.float16, dtypes.float32, dtypes.float64:
104 if dt == dtypes.float16:
111 for dt in dtypes.float16, dtypes.float32, dtypes.float64:
121 rnd1 = random_ops.random_normal(shape, 0.0, 1.0, dtypes.float32)
122 rnd2 = random_ops.random_normal(shape, 0.0, 1.0, dtypes.float32)
129 for dt in dtypes.float16, dtypes.float32, dtypes.float64:
136 for dt in dtypes.float16, dtypes.float32, dtypes.float64:
149 for dt in dtypes.float16, dtypes.float32, dtypes.float64:
[all …]
Drandom_gamma_test.py24 from tensorflow.python.framework import dtypes
62 [5], alpha=np.ones([2, 0, 3]), beta=np.ones([3]), dtype=dtypes.float32))
66 self._testMoments(dtypes.float32)
70 self._testMoments(dtypes.float64)
86 if dt == dtypes.float64:
117 dtypes.float16: stats.gamma(alpha).cdf(np.finfo(np.float16).tiny),
118 dtypes.float32: stats.gamma(alpha).cdf(np.finfo(np.float32).tiny),
119 dtypes.float64: stats.gamma(alpha).cdf(np.finfo(np.float64).tiny)
123 for dt in dtypes.float16, dtypes.float32, dtypes.float64:
144 for dt in dtypes.float16, dtypes.float32, dtypes.float64:
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/
Ddecode_raw_op_test.py23 from tensorflow.python.framework import dtypes
35 for dtype in [dtypes.bool, dtypes.int8, dtypes.uint8, dtypes.int16,
36 dtypes.uint16, dtypes.int32, dtypes.int64, dtypes.float16,
37 dtypes.float32, dtypes.float64, dtypes.complex64,
38 dtypes.complex128]:
39 in_bytes = array_ops.placeholder(dtypes.string, shape=[None])
46 parsing_ops.decode_raw(["A", "a"], dtypes.uint8))
50 parsing_ops.decode_raw(["wer", "XYZ"], dtypes.uint8))
55 self.evaluate(parsing_ops.decode_raw(["short", "longer"], dtypes.uint8))
60 parsing_ops.decode_raw(["AaBC"], dtypes.uint16))
[all …]
Dlist_ops_test.py32 from tensorflow.python.framework import dtypes
56 element_dtype=dtypes.float32,
60 l, e = list_ops.tensor_list_pop_back(l, element_dtype=dtypes.float32)
61 l = list_ops.tensor_list_stack(l, element_dtype=dtypes.float32)
81 element_dtype=dtypes.float32, element_shape=[], max_num_elements=1)
93 element_dtype=dtypes.float32,
98 l = list_ops.tensor_list_pop_back(l, element_dtype=dtypes.float32)
103 element_dtype=dtypes.float32, element_shape=[2, 3], num_elements=3)
104 _, e = list_ops.tensor_list_pop_back(l, element_dtype=dtypes.float32)
105 l = list_ops.tensor_list_stack(l, element_dtype=dtypes.float32)
[all …]
Dpy_func_test.py35 from tensorflow.python.framework import dtypes
93 for dtype in [dtypes.float16, dtypes.float32, dtypes.float64,
94 dtypes.uint8, dtypes.int8, dtypes.uint16, dtypes.int16,
95 dtypes.int32, dtypes.int64]:
105 for dtype in [dtypes.complex64, dtypes.complex128]:
115 dtype = dtypes.bool
124 x = constant_op.constant(1.0, dtypes.float32)
125 y = constant_op.constant(2.0, dtypes.float32)
126 z = self.evaluate(script_ops.py_func(np_func, [x, y], dtypes.float32))
131 x = constant_op.constant(1.0, dtypes.float32)
[all …]
Dlookup_ops_test.py37 from tensorflow.python.framework import dtypes
85 values = constant_op.constant([0, 1, 2], dtypes.int64)
108 values = constant_op.constant([0, 1, 2], dtypes.int64)
128 keys, values, value_dtype=dtypes.int64), default_val)
158 values = constant_op.constant([0, 1, 2], dtypes.int64)
185 default_val = constant_op.constant(-1, dtypes.int64)
187 values = constant_op.constant([0, 1, 2], dtypes.int64)
199 default_val = constant_op.constant(-1, dtypes.int64)
201 values = constant_op.constant([0, 1, 2], dtypes.int64)
213 default_val = constant_op.constant(-1, dtypes.int64)
[all …]
Dsparse_matmul_op_test.py24 from tensorflow.python.framework import dtypes
50 x_dtype=dtypes.float32,
51 y_dtype=dtypes.float32):
63 np_x = math_ops.cast(tf_x, dtypes.float32).eval()
64 np_y = math_ops.cast(tf_y, dtypes.float32).eval()
79 for x_dtype in (dtypes.float32, dtypes.bfloat16):
80 for y_dtype in (dtypes.float32, dtypes.bfloat16):
87 for x_dtype in (dtypes.float32, dtypes.bfloat16):
88 for y_dtype in (dtypes.float32, dtypes.bfloat16):
95 for x_dtype in (dtypes.float32, dtypes.bfloat16):
[all …]
Dmap_stage_op_test.py20 from tensorflow.python.framework import dtypes
37 x = array_ops.placeholder(dtypes.float32)
38 pi = array_ops.placeholder(dtypes.int64)
39 gi = array_ops.placeholder(dtypes.int64)
42 stager = data_flow_ops.MapStagingArea([dtypes.float32])
59 x = array_ops.placeholder(dtypes.float32)
60 pi = array_ops.placeholder(dtypes.int64)
61 gi = array_ops.placeholder(dtypes.int64)
64 stager = data_flow_ops.MapStagingArea([dtypes.float32, dtypes.float32])
82 x = array_ops.placeholder(dtypes.float32)
[all …]
/external/tensorflow/tensorflow/python/data/experimental/kernel_tests/
Dsql_dataset_test.py26 from tensorflow.python.framework import dtypes
42 output_types=(dtypes.string, dtypes.string, dtypes.string),
59 output_types=(dtypes.string, dtypes.string, dtypes.string)))
74 output_types=(dtypes.string, dtypes.string, dtypes.string)))
91 output_types=(dtypes.string, dtypes.string, dtypes.string)))
100 output_types=(dtypes.string, dtypes.string, dtypes.string)))
116 output_types=(dtypes.string, dtypes.string, dtypes.string)))
128 output_types=(dtypes.string, dtypes.string, dtypes.string))
138 output_types=(dtypes.string, dtypes.string, dtypes.string)))
149 output_types=(dtypes.string, dtypes.string, dtypes.string)))
[all …]
Dmap_defun_op_test.py30 from tensorflow.python.framework import dtypes
53 @function.defun(input_signature=[tensor_spec.TensorSpec([2], dtypes.int32)])
58 elems = constant_op.constant(nums, dtype=dtypes.int32, name="data")
60 simple_fn, [elems], [dtypes.int32], [(2,)],
68 @function.defun(input_signature=[tensor_spec.TensorSpec([2], dtypes.int32)])
73 elems = constant_op.constant(nums, dtype=dtypes.int32, name="data")
74 r = map_defun.map_defun(simple_fn, [elems], [dtypes.int32], [(2,)])[0]
81 @function.defun(input_signature=[tensor_spec.TensorSpec([], dtypes.int32)])
83 return math_ops.cast(x, dtypes.float64)
86 elems = constant_op.constant(nums, dtype=dtypes.int32, name="data")
[all …]
/external/tensorflow/tensorflow/python/tpu/
Dtpu_infeed_test.py24 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])
72 self.assertEqual(i.tuple_types, [dtypes.float32, dtypes.int32])
73 i.set_tuple_types([dtypes.float32, dtypes.float32])
74 self.assertEqual(i.tuple_types, [dtypes.float32, dtypes.float32])
76 i.set_tuple_types([dtypes.float32])
87 t1 = constant_op.constant(1, dtypes.int32, shape=[6])
[all …]
/external/tensorflow/tensorflow/python/data/util/
Dstructure_test.py32 from tensorflow.python.framework import dtypes
59 [dtypes.float32], [[]]),
61 dtype=dtypes.float32, element_shape=(3,), size=0),
62 tensor_array_ops.TensorArraySpec, [dtypes.variant], [[]]),
65 sparse_tensor.SparseTensorSpec, [dtypes.variant], [None]),
67 ragged_tensor.RaggedTensorSpec, [dtypes.variant], [None]),
70 tuple, [dtypes.float32, dtypes.int32], [[], [3]]),
74 }, dict, [dtypes.float32, dtypes.int32], [[], [3]]),
82 }, dict, [dtypes.float32, dtypes.variant, dtypes.variant], [[], None, None
103 array_ops.placeholder(dtypes.float32),
[all …]
/external/tensorflow/tensorflow/python/ops/ragged/
Dconvert_to_tensor_or_ragged_tensor_op_test.py25 from tensorflow.python.framework import dtypes
41 dict(pylist=[[1, 2], [3]], preferred_dtype=dtypes.float32),
42 dict(pylist=[[1, 2], [3]], preferred_dtype=dtypes.string),
47 preferred_dtype=dtypes.string),
48 dict(pylist=np.array([[1, 2], [3]]), preferred_dtype=dtypes.float32),
49 dict(pylist=np.array([[1, 2], [3]]), preferred_dtype=dtypes.string),
52 preferred_dtype=dtypes.float32),
53 dict(pylist=[np.array(1)], preferred_dtype=dtypes.string),
64 dtype=dtypes.float32,
69 dtype=dtypes.float32,
[all …]
/external/tensorflow/tensorflow/python/data/kernel_tests/
Drange_test.py26 from tensorflow.python.framework import dtypes
37 dtypes.int32, dtypes.int64, dtypes.float32, dtypes.float64
50 dtypes.int32, dtypes.int64, dtypes.float32, dtypes.float64
63 dtypes.int32, dtypes.int64, dtypes.float32, dtypes.float64
78 dtypes.int32, dtypes.int64, dtypes.float32, dtypes.float64
91 dtypes.int32, dtypes.int64, dtypes.float32, dtypes.float64
106 dtypes.int32, dtypes.int64, dtypes.float32, dtypes.float64
119 dtypes.int32, dtypes.int64, dtypes.float32, dtypes.float64
134 dtypes.int32, dtypes.int64, dtypes.float32, dtypes.float64
/external/tensorflow/tensorflow/python/ops/
Dmath_grad_test.py27 from tensorflow.python.framework import dtypes
75 if dtype in (dtypes.complex64, dtypes.complex128):
96 [3, 3], dtype=dtypes.float32, max_error=2e-5, bias=0.1, sigma=1.0)
98 [3, 3], dtype=dtypes.complex64, max_error=2e-5, bias=0.1, sigma=1.0)
102 [3, 3], dtype=dtypes.float32, max_error=100.0, bias=0.0, sigma=0.1)
104 [3, 3], dtype=dtypes.complex64, max_error=100.0, bias=0.0, sigma=0.1)
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)
[all …]
/external/tensorflow/tensorflow/tools/api/golden/v1/
Dtensorflow.dtypes.pbtxt1 path: "tensorflow.dtypes"
13 mtype: "<class \'tensorflow.python.framework.dtypes.DType\'>"
17 mtype: "<class \'tensorflow.python.framework.dtypes.DType\'>"
21 mtype: "<class \'tensorflow.python.framework.dtypes.DType\'>"
25 mtype: "<class \'tensorflow.python.framework.dtypes.DType\'>"
29 mtype: "<class \'tensorflow.python.framework.dtypes.DType\'>"
33 mtype: "<class \'tensorflow.python.framework.dtypes.DType\'>"
37 mtype: "<class \'tensorflow.python.framework.dtypes.DType\'>"
41 mtype: "<class \'tensorflow.python.framework.dtypes.DType\'>"
45 mtype: "<class \'tensorflow.python.framework.dtypes.DType\'>"
[all …]
/external/tensorflow/tensorflow/tools/api/golden/v2/
Dtensorflow.dtypes.pbtxt1 path: "tensorflow.dtypes"
13 mtype: "<class \'tensorflow.python.framework.dtypes.DType\'>"
17 mtype: "<class \'tensorflow.python.framework.dtypes.DType\'>"
21 mtype: "<class \'tensorflow.python.framework.dtypes.DType\'>"
25 mtype: "<class \'tensorflow.python.framework.dtypes.DType\'>"
29 mtype: "<class \'tensorflow.python.framework.dtypes.DType\'>"
33 mtype: "<class \'tensorflow.python.framework.dtypes.DType\'>"
37 mtype: "<class \'tensorflow.python.framework.dtypes.DType\'>"
41 mtype: "<class \'tensorflow.python.framework.dtypes.DType\'>"
45 mtype: "<class \'tensorflow.python.framework.dtypes.DType\'>"
[all …]
/external/tensorflow/tensorflow/compiler/tests/
Dtensor_list_ops_test.py27 from tensorflow.python.framework import dtypes
38 dim = array_ops.placeholder(dtypes.int32)
41 element_dtype=dtypes.float32,
43 e32 = list_ops.tensor_list_element_shape(l, shape_type=dtypes.int32)
44 e64 = list_ops.tensor_list_element_shape(l, shape_type=dtypes.int64)
52 element_dtype=dtypes.float32,
58 l, e2 = list_ops.tensor_list_pop_back(l, element_dtype=dtypes.float32)
59 _, e1 = list_ops.tensor_list_pop_back(l, element_dtype=dtypes.float32)
65 val = array_ops.placeholder(dtype=dtypes.float32)
68 element_dtype=dtypes.float32,
[all …]
Dvariable_ops_test.py25 from tensorflow.python.framework import dtypes
131 resource_variable_ops.variable_shape(h, out_type=dtypes.int64)
175 dtype=dtypes.float32,
181 dtype=dtypes.float32,
185 x = array_ops.placeholder(dtypes.float32, shape=[1, 4])
224 dtype=dtypes.int32, shape=[2, 1])
227 handle, constant_op.constant([[1], [7]], dtype=dtypes.int32)))
230 handle, [0], constant_op.constant([[2]], dtype=dtypes.int32)))
231 read = resource_variable_ops.read_variable_op(handle, dtype=dtypes.int32)
237 dtype=dtypes.int32, shape=[2, 1])
[all …]
/external/tensorflow/tensorflow/python/keras/layers/preprocessing/
Dindex_lookup_test.py34 from tensorflow.python.framework import dtypes
76 "dtype": dtypes.string,
80 dtypes.string
98 "dtype": dtypes.string,
105 dtypes.int64
124 "dtype": dtypes.string,
128 dtypes.string
148 "dtype": dtypes.int64,
152 dtypes.int64
172 "dtype": dtypes.int64,
[all …]
/external/tensorflow/tensorflow/lite/python/optimize/
Dcalibrator_test.py27 from tensorflow.python.framework import dtypes
37 ('UseActivationTypeInt8', dtypes.int8),
39 ('UseActivationTypeInt16', dtypes.int16))
52 dtypes.float32,
53 dtypes.float32,
60 ('UseActivationTypeInt8', dtypes.int8),
62 ('UseActivationTypeInt16', dtypes.int16))
75 dtypes.float32,
76 dtypes.float32,
93 input_gen, dtypes.float32, dtypes.float32, True, 'conv2d_8/BiasAdd')
[all …]

12345678910>>...53