Home
last modified time | relevance | path

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

12345678910>>...39

/external/tensorflow/tensorflow/python/framework/
Ddtypes_test.py24 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)
74 self.assertIs(dtypes.float32, dtypes.as_dtype(np.float32))
[all …]
Dtensor_spec_test.py24 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 …]
Dtensor_util.py38 from tensorflow.python.framework import dtypes
56 np.asarray(x, dtype=dtypes.bfloat16.as_numpy_dtype).view(np.uint16))
66 dtypes.bfloat16.as_numpy_dtype:
101 dtypes.qint8.as_numpy_dtype:
103 dtypes.quint8.as_numpy_dtype:
105 dtypes.qint16.as_numpy_dtype:
107 dtypes.quint16.as_numpy_dtype:
109 dtypes.qint32.as_numpy_dtype:
151 dtypes.bfloat16.as_numpy_dtype: SlowAppendBFloat16ArrayToTensorProto,
167 dtypes.qint8.as_numpy_dtype: SlowAppendQIntArrayToTensorProto,
[all …]
Dop_def_library_test.py26 from tensorflow.python.framework import dtypes
120 self.assertEqual(dtypes.float32, out.dtype)
149 self._lib.apply_op("Simple", a=self.Tensor(dtypes.string))
189 self.assertEqual(dtypes.int32, out.dtype)
196 self.assertEqual(dtypes.string, out.dtype)
203 self.assertEqual(dtypes.string, out.dtype)
210 self._lib.apply_op("Polymorphic", a="s", T=dtypes.string)
216 out = self._lib.apply_op("PolymorphicOut", T=dtypes.int32, name="p")
217 self.assertEqual(dtypes.int32, out.dtype)
223 out = self._lib.apply_op("PolymorphicOut", T=dtypes.bool, name="q")
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/random/
Drandom_ops_test.py25 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:
88 rnd1 = random_ops.random_normal(shape, 0.0, 1.0, dtypes.float32)
89 rnd2 = random_ops.random_normal(shape, 0.0, 1.0, dtypes.float32)
115 for dt in dtypes.float16, dtypes.float32, dtypes.float64:
134 for dt in dtypes.float16, dtypes.float32, dtypes.float64:
142 if dt == dtypes.float16:
[all …]
Drandom_gamma_test.py26 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:
177 for dt in dtypes.float16, dtypes.float32, dtypes.float64:
183 count_limit = 20 if dt == dtypes.float16 else 10
[all …]
/external/tensorflow/tensorflow/contrib/data/python/kernel_tests/
Dsql_dataset_op_test.py26 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,
135 dtypes.string))
153 init_op, get_next = self._createSqlDataset((dtypes.string, dtypes.string,
[all …]
/external/tensorflow/tensorflow/contrib/tpu/python/tpu/
Dtpu_infeed_test.py25 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/contrib/lookup/
Dlookup_ops_test.py28 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/python/kernel_tests/
Dpy_func_test.py30 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 …]
Dsparse_matmul_op_test.py24 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):
85 for y_dtype in (dtypes.float32, dtypes.bfloat16):
91 for x_dtype in (dtypes.float32, dtypes.bfloat16):
[all …]
Dscatter_nd_ops_test.py27 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 …]
Dmap_stage_op_test.py20 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])
78 x = array_ops.placeholder(dtypes.float32)
[all …]
Dstack_ops_test.py24 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 …]
Dinit_ops_test.py25 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 …]
Daggregate_ops_test.py25 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,
45 dtypes.float16, dtypes.float32, dtypes.float64, dtypes.complex64,
46 dtypes.complex128]
65 tol = 5e-3 if dtype == dtypes.float16 else 5e-7
78 tol = 5e-3 if dtype == dtypes.float16 else 5e-7
86 dtype=dtypes.variant.as_datatype_enum,
/external/tensorflow/tensorflow/python/estimator/canned/
Dparsing_utils_test.py23 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/gan/python/features/python/
Dconditioning_utils_test.py23 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/compiler/tests/
Dstack_ops_test.py24 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/data/util/
Dsparse_test.py24 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 …]
/external/tensorflow/tensorflow/tools/quantization/
Dquantize_graph_test.py28 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/ops/
Dbitwise_ops_test.py25 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,
55 dtypes.int32, dtypes.int64,
56 dtypes.uint8, dtypes.uint16]
73 dtype_list = [dtypes.int8, dtypes.int16, dtypes.int32, dtypes.int64,
74 dtypes.uint8, dtypes.uint16, dtypes.uint32, dtypes.uint64]
139 dtype_list = [dtypes.int8, dtypes.int16, dtypes.int32, dtypes.int64,
140 dtypes.uint8, dtypes.uint16]
/external/tensorflow/tensorflow/contrib/metrics/python/metrics/
Dclassification_test.py22 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/python/eager/
Dgraph_callable_test.py24 from tensorflow.python.framework import dtypes
37 [graph_callable.ShapeAndDtype(shape=(), dtype=dtypes.float32)])
44 2, my_function(constant_op.constant(2, dtype=dtypes.float32)).numpy())
48 3, my_function(constant_op.constant(2, dtype=dtypes.float32)).numpy())
53 [graph_callable.ShapeAndDtype(shape=(), dtype=dtypes.float32)])
59 my_function(constant_op.constant(4, dtype=dtypes.float32))
76 [graph_callable.ShapeAndDtype(shape=(), dtype=dtypes.float32)])
83 2, my_function(constant_op.constant(2, dtype=dtypes.float32)).numpy())
87 3, my_function(constant_op.constant(2, dtype=dtypes.float32)).numpy())
92 [graph_callable.ShapeAndDtype(shape=(1), dtype=dtypes.float32)])
[all …]
/external/tensorflow/tensorflow/python/training/
Doptimizer_test.py22 from tensorflow.python.framework import dtypes
39 for i, dtype in enumerate([dtypes.half, dtypes.float32, dtypes.float64]):
51 array_ops.zeros([], dtypes.int64), name='global_step_%d' % i)
66 for dtype in [dtypes.half, dtypes.float32, dtypes.float64]:
72 array_ops.zeros([], dtypes.int64), name='global_step')
91 for dtype in [dtypes.half, dtypes.float32, dtypes.float64]:
98 array_ops.zeros([], dtypes.int64), name='global_step')
117 for dtype in [dtypes.half, dtypes.float32, dtypes.float64]:
132 for i, dtype in enumerate([dtypes.half, dtypes.float32, dtypes.float64]):
150 for i, dtype in enumerate([dtypes.half, dtypes.float32, dtypes.float64]):
[all …]

12345678910>>...39