Home
last modified time | relevance | path

Searched refs:expected_dtype (Results 1 – 22 of 22) sorted by relevance

/external/tensorflow/tensorflow/python/ops/ragged/
Dconvert_to_tensor_or_ragged_tensor_op_test.py97 expected_dtype=dtypes.int32),
100 expected_dtype=dtypes.string),
105 expected_dtype=dtypes.float32),
110 expected_dtype=dtypes.float32),
115 expected_dtype=dtypes.int32),
121 expected_dtype=None): argument
122 if expected_dtype is None:
123 expected_dtype = value.dtype if dtype is None else dtype
127 self.assertEqual(dtypes.as_dtype(expected_dtype), converted.dtype)
188 expected_dtype=dtypes.int32),
[all …]
Dragged_constant_value_op_test.py156 dict(pylist=[], expected_dtype=np.float64),
157 dict(pylist=[[[], [[[]], []]]], expected_dtype=np.float64),
158 dict(pylist=[[1, 2], [3], [4, 5, 6]], expected_dtype=np.int64),
159 dict(pylist=[[1., 2.], [], [4., 5., 6.]], expected_dtype=np.float64),
160 dict(pylist=[[1, 2], [3.], [4, 5, 6]], expected_dtype=np.float64),
161 dict(pylist=[[b'a', b'b'], [b'c']], expected_dtype=np.dtype('S1')),
162 dict(pylist=[[True]], expected_dtype=np.bool),
165 expected_dtype=np.float64),
179 dict(pylist=[], dtype=dtypes.float32, expected_dtype=np.float32),
180 dict(pylist=[], dtype=dtypes.int32, expected_dtype=np.int32),
[all …]
Dragged_const_op_test.py154 dict(pylist=[], expected_dtype=dtypes.float32),
155 dict(pylist=[[[], [[[]], []]]], expected_dtype=dtypes.float32),
156 dict(pylist=[[1, 2], [3], [4, 5, 6]], expected_dtype=dtypes.int32),
157 dict(pylist=[[1., 2.], [], [4., 5., 6.]], expected_dtype=dtypes.float32),
158 dict(pylist=[[1, 2], [3.], [4, 5, 6]], expected_dtype=dtypes.float32),
159 dict(pylist=[[b'a', b'b'], [b'c']], expected_dtype=dtypes.string),
160 dict(pylist=[[True]], expected_dtype=dtypes.bool),
163 expected_dtype=dtypes.float32),
184 expected_dtype=None): argument
210 if expected_dtype is not None:
[all …]
Drow_partition_test.py692 expected_uniform_row_length, expected_dtype): argument
697 self.assertEqual(spec.dtype, expected_dtype)
/external/tensorflow/tensorflow/python/framework/
Dpython_tensor_converter.cc56 bool CheckDType(DataType actual_dtype, DataType& expected_dtype) { in CheckDType() argument
57 if (expected_dtype == DT_INVALID) { in CheckDType()
58 expected_dtype = actual_dtype; // set output parameter. in CheckDType()
59 } else if (expected_dtype != actual_dtype) { in CheckDType()
61 absl::StrCat("Expected ", DataType_Name(expected_dtype), in CheckDType()
Dtest_util.py3041 def assertDTypeEqual(self, target, expected_dtype): argument
3053 self.assertEqual(arr.dtype, expected_dtype)
/external/tensorflow/tensorflow/python/training/
Dtraining_util_test.py31 def _assert_global_step(self, global_step, expected_dtype=dtypes.int64): argument
33 self.assertEqual(expected_dtype, global_step.dtype.base_dtype)
85 training_util.get_global_step(), expected_dtype=dtypes.int32)
87 training_util.get_global_step(g), expected_dtype=dtypes.int32)
/external/tensorflow/tensorflow/python/keras/mixed_precision/
Dtest_util.py32 def create_identity_with_grad_check_fn(expected_gradient, expected_dtype=None): argument
55 if expected_dtype:
56 assert dx.dtype == expected_dtype, (
57 'dx.dtype should be %s but is: %s' % (expected_dtype, dx.dtype))
Dkeras_test.py754 expected_dtype=dtypes.float16,
850 expected_dtype=dtypes.float16,
/external/tensorflow/tensorflow/c/experimental/saved_model/core/
Dsignature_flattening_test.cc33 DataType expected_dtype) { in TensorSpecsAreEqual() argument
36 spec.dtype() == expected_dtype; in TensorSpecsAreEqual()
/external/tensorflow/tensorflow/python/training/experimental/
Dloss_scale_optimizer_test.py69 def create_identity_with_grad_check_fn(expected_gradient, expected_dtype=None): argument
92 if expected_dtype:
93 assert dx.dtype == expected_dtype, (
94 'dx.dtype should be %s but is: %s' % (expected_dtype, dx.dtype))
/external/tensorflow/tensorflow/core/kernels/sparse/
Dcsr_sparse_matrix_to_sparse_tensor_op.cc47 DataType expected_dtype) { in ValidateCSRSparseMatrix() argument
48 if (csr_sparse_matrix.dtype() != expected_dtype) { in ValidateCSRSparseMatrix()
50 "Expected a CSRSparseMatrix of type ", DataTypeString(expected_dtype), in ValidateCSRSparseMatrix()
/external/tensorflow/tensorflow/cc/ops/
Dconst_op_test.cc38 void ExpectTypeAndShape(const Node* n, DataType expected_dtype, in ExpectTypeAndShape() argument
45 EXPECT_EQ(dtype, expected_dtype); in ExpectTypeAndShape()
/external/tensorflow/tensorflow/core/framework/
Dtensor.cc664 void Tensor::CheckType(DataType expected_dtype) const { in CheckType()
665 CHECK_EQ(dtype(), expected_dtype) in CheckType()
666 << " " << DataTypeString(expected_dtype) << " expected, got " in CheckType()
670 void Tensor::CheckTypeAndIsAligned(DataType expected_dtype) const { in CheckTypeAndIsAligned()
671 CHECK_EQ(dtype(), expected_dtype) in CheckTypeAndIsAligned()
672 << " " << DataTypeString(expected_dtype) << " expected, got " in CheckTypeAndIsAligned()
Dtensor.h658 void CheckType(DataType expected_dtype) const;
659 void CheckTypeAndIsAligned(DataType expected_dtype) const;
/external/python/pybind11/tests/
Dtest_numpy_dtypes.py80 def assert_equal(actual, expected_data, expected_dtype): argument
81 np.testing.assert_equal(actual, np.array(expected_data, dtype=expected_dtype))
/external/tensorflow/tensorflow/python/keras/layers/
Dkernelized_test.py235 expected_dtype = (
243 'dtype': expected_dtype,
/external/tensorflow/tensorflow/core/kernels/data/
Ddataset_test_base.cc554 DataType expected_dtype = RemoveRefType(input_types[inputs->size()]); in AddDatasetInput() local
555 if (expected_dtype != dtype) { in AddDatasetInput()
557 " , but expected: ", expected_dtype); in AddDatasetInput()
/external/tensorflow/tensorflow/lite/python/
Dlite_v2_test.py655 expected_dtype = inference_input_output_type.as_numpy_dtype
658 expected_dtype if enable_mlir_quantizer else dtypes.float32)
665 self.assertEqual(input_details[1]['dtype'], expected_dtype)
669 self.assertEqual(output_details[1]['dtype'], expected_dtype)
Dlite_test.py374 expected_dtype = inference_input_output_type.as_numpy_dtype
377 expected_dtype if enable_mlir_quantizer else dtypes.float32)
384 self.assertEqual(input_details[1]['dtype'], expected_dtype)
388 self.assertEqual(output_details[1]['dtype'], expected_dtype)
/external/tensorflow/tensorflow/python/ops/
Dimage_ops_test.py2762 expected_dtype = image.dtype
2764 expected_dtype = dtypes.float32
2765 self.assertEqual(y.dtype, expected_dtype)
2778 expected_dtype = image.dtype
2780 expected_dtype = dtypes.float32
2782 self.assertEqual(y.dtype, expected_dtype)
3306 expected_dtype = image.dtype
3308 expected_dtype = dtypes.float32
3309 self.assertEqual(y.dtype, expected_dtype)
3323 expected_dtype = image.dtype
[all …]
/external/tensorflow/tensorflow/python/data/ops/
Ddataset_ops.py927 for (ret_array, expected_dtype,
930 if ret_array.dtype != expected_dtype.as_numpy_dtype:
934 (ret_array.dtype, expected_dtype.as_numpy_dtype))