/external/tensorflow/tensorflow/python/kernel_tests/ |
morphological_ops_test.py | 32 def _VerifyValues(self, image, kernel, strides, rates, padding, out, use_gpu): 42 use_gpu: Whether we are running on GPU. 47 with self.test_session(use_gpu=use_gpu): 57 def _testDilationValidPadding(self, use_gpu): 71 use_gpu=use_gpu) 73 def _testDilationSamePadding(self, use_gpu): 87 use_gpu=use_gpu) [all...] |
pooling_ops_test.py | 46 all the valid test configs as tuples of data_format and use_gpu. 96 data_format, data_type, expected, use_gpu, v2): 109 use_gpu: Whether we are running on GPU. 130 with self.test_session(use_gpu=use_gpu): 172 data_format, expected, use_gpu, v2): 184 use_gpu: Whether we are running on GPU. 194 data_format, dtypes.float32, expected, use_gpu, v2) 196 if not use_gpu or test_util.CudaSupportsHalfMatMulAndConv(): 198 data_format, dtypes.float16, expected, use_gpu, v2 [all...] |
stack_ops_test.py | 35 def _testStackPushPop(self, use_gpu): 36 with self.test_session(use_gpu=use_gpu): 45 self._testStackPushPop(use_gpu=False) 46 self._testStackPushPop(use_gpu=True) 48 def _testStackPushPopSwap(self, use_gpu): 49 with self.test_session(use_gpu=use_gpu): 60 self._testStackPushPopSwap(use_gpu=False) 61 self._testStackPushPopSwap(use_gpu=True [all...] |
conv_ops_test.py | 149 all the valid test configs as tuples of data_format and use_gpu. 160 def _DtypesToTest(self, use_gpu): 161 if use_gpu and not test_util.CudaSupportsHalfMatMulAndConv(): 169 strides, padding, data_format, dtype, use_gpu): 182 use_gpu: True if the operations should be run on GPU 197 with test_util.device(use_gpu): 233 def _SetupVal(data_format, use_gpu): 234 with test_util.device(use_gpu): 248 for (data_format, use_gpu) in GetTestConfigs(): 249 tensors.append(_SetupVal(data_format, use_gpu)) [all...] |
softmax_op_test.py | 49 def _testSoftmax(self, np_features, dim=-1, log=False, use_gpu=False): 55 with self.test_session(use_gpu=use_gpu): 70 self._testSoftmax(features, use_gpu=True) 71 self._testSoftmax(features, log=True, use_gpu=True) 72 self._testOverflow(use_gpu=True) 100 def _testOverflow(self, use_gpu=False): 101 if use_gpu: 107 with self.test_session(use_gpu=use_gpu) [all...] |
denormal_test.py | 37 def _flushDenormalsTest(self, use_gpu, dtypes): 42 with self.test_session(use_gpu=use_gpu): 55 self._flushDenormalsTest(use_gpu=False, dtypes=(np.float32, np.float64)) 59 self._flushDenormalsTest(use_gpu=True, dtypes=(np.float32,))
|
softsign_op_test.py | 35 def _testSoftsign(self, np_features, use_gpu=False): 37 with self.test_session(use_gpu=use_gpu): 47 use_gpu=False) 50 use_gpu=True)
|
depthwise_conv_op_test.py | 100 use_gpu, 112 use_gpu: Whether to use GPU. 124 with self.test_session(use_gpu=use_gpu) as sess: 162 print("data_type:", data_type, "use_gpu:", use_gpu, "max diff = ", 176 input_size, filter_size, stride, padding, data_type, use_gpu=True) 193 use_gpu=True, 199 expected, use_gpu): 210 use_gpu: Whether to use GPU [all...] |
dense_update_ops_test.py | 32 def _initAssignFetch(self, x, y, use_gpu=False): 35 with self.test_session(use_gpu=use_gpu): 42 def _initAssignAddFetch(self, x, y, use_gpu=False): 44 with self.test_session(use_gpu=use_gpu): 51 def _initAssignSubFetch(self, x, y, use_gpu=False): 53 with self.test_session(use_gpu=use_gpu): 64 var_value, op_value = self._initAssignFetch(x, y, use_gpu=False [all...] |
bias_op_test.py | 37 all the valid test configs as tuples of data_format and use_gpu. 62 def _testBias(self, np_inputs, np_bias, use_gpu=False): 64 with self.test_session(use_gpu=use_gpu): 89 def _testBiasNCHW(self, np_inputs, np_bias, use_gpu): 92 with self.test_session(use_gpu=use_gpu): 98 self._testBias(np_inputs, np_bias, use_gpu=False) 100 self._testBias(np_inputs, np_bias, use_gpu=True) 102 self._testBiasNCHW(np_inputs, np_bias, use_gpu=True [all...] |
xent_op_test.py | 48 def _testXent(self, np_features, np_labels, use_gpu=False): 50 with self.test_session(use_gpu=use_gpu) as sess: 57 def _testXentWrapper(self, np_features, np_labels, dim=-1, use_gpu=False): 59 with self.test_session(use_gpu=use_gpu) as sess: 68 self._testXent(features, labels, use_gpu=False) 69 self._testXent(features, labels, use_gpu=True) 71 def _testSingleClass(self, use_gpu=False): 73 with self.test_session(use_gpu=use_gpu) as sess [all...] |
shape_ops_test.py | 51 def _compareShape(self, x, use_gpu=False): 53 with self.test_session(use_gpu=use_gpu): 62 def _compareShapeSparse(self, x_np, use_gpu=False): 65 with self.test_session(use_gpu=use_gpu): 71 def _compareShapeN(self, x, use_gpu=False): 73 with self.test_session(use_gpu=use_gpu) as sess: 83 def _compareRank(self, x, use_gpu=False) [all...] |
basic_gpu_test.py | 43 with self.test_session(use_gpu=True) as sess: 49 with self.test_session(use_gpu=False) as sess: 94 def _compare(self, x, np_func, tf_func, use_gpu): 96 with self.test_session(use_gpu=use_gpu) as sess: 108 def _testDtype(self, dtype, use_gpu): 111 self._compare(data, np.abs, math_ops.abs, use_gpu) 112 self._compare(data, np.arccos, math_ops.acos, use_gpu) 113 self._compare(data, np.arcsin, math_ops.asin, use_gpu) 114 self._compare(data, np.arcsinh, math_ops.asinh, use_gpu) [all...] |
bucketize_op_test.py | 34 with self.test_session(use_gpu=True) as sess: 42 with self.test_session(use_gpu=True) as sess: 50 with self.test_session(use_gpu=True) as sess: 56 with self.test_session(use_gpu=True) as sess:
|
neon_depthwise_conv_op_test.py | 94 use_gpu, 105 use_gpu: Whether to use GPU. 117 with self.test_session(use_gpu=use_gpu) as sess: 162 input_size, filter_size, stride, padding, use_gpu=True) 164 input_size, filter_size, stride, padding, use_gpu=False) 178 use_gpu=True, 184 expected, use_gpu): 195 use_gpu: Whether to use GPU. 207 with self.test_session(use_gpu=use_gpu) as sess [all...] |
softplus_op_test.py | 38 def _testSoftplus(self, np_features, use_gpu=False): 40 with self.test_session(use_gpu=use_gpu): 51 use_gpu=False) 54 use_gpu=True) 64 use_gpu=False) 71 use_gpu=True)
|
relu_op_test.py | 54 def _testRelu(self, np_features, use_gpu=False): 56 with self.test_session(use_gpu=use_gpu): 66 use_gpu=False) 70 use_gpu=True) 169 def _testRelu6(self, np_features, use_gpu=False): 171 with self.test_session(use_gpu=use_gpu): 181 use_gpu=False) 185 use_gpu=True [all...] |
/external/tensorflow/tensorflow/contrib/sparsemax/python/kernel_tests/ |
sparsemax_test.py | 72 def _tf_sparsemax(self, z, dtype, use_gpu): 73 with self.test_session(use_gpu=use_gpu): 79 def _test_sparsemax_against_numpy(self, dtype, random, use_gpu): 83 tf_sparsemax_op, tf_sparsemax_out = self._tf_sparsemax(z, dtype, use_gpu) 90 def _test_sparsemax_of_zero(self, dtype, random, use_gpu): 94 tf_sparsemax_op, tf_sparsemax_out = self._tf_sparsemax(z, dtype, use_gpu) 100 def _test_sparsemax_of_inf(self, dtype, random, use_gpu): 115 dtype, use_gpu) 120 def _test_constant_add(self, dtype, random, use_gpu) [all...] |
sparsemax_loss_test.py | 81 def _tf_sparsemax(self, z, dtype, use_gpu): 82 with self.test_session(use_gpu=use_gpu): 88 def _tf_sparsemax_loss(self, z, q, dtype, use_gpu): 92 with self.test_session(use_gpu=use_gpu): 99 def _test_sparsemax_loss_against_numpy(self, dtype, random, use_gpu): 105 tf_loss_op, tf_loss_out = self._tf_sparsemax_loss(z, q, dtype, use_gpu) 112 def _test_constant_add(self, dtype, random, use_gpu): 119 _, tf_loss_zpc = self._tf_sparsemax_loss(z + c, q, dtype, use_gpu) [all...] |
/external/tensorflow/tensorflow/python/kernel_tests/random/ |
random_ops_test.py | 35 def _Sampler(self, num, mu, sigma, dtype, use_gpu, seed=None): 38 with self.test_session(use_gpu=use_gpu, graph=ops.Graph()) as sess: 53 sampler = self._Sampler(1000, 0.0, 1.0, dt, use_gpu=True) 69 for use_gpu in [False, True]: 71 1000000, 0.0, 1.0, dt, use_gpu=use_gpu, seed=12345) 72 results[use_gpu] = sampler() 80 sx = self._Sampler(1000, 0.0, 1.0, dt, use_gpu=True, seed=345) 81 sy = self._Sampler(1000, 0.0, 1.0, dt, use_gpu=True, seed=345 [all...] |
random_gamma_test.py | 43 def _Sampler(self, num, alpha, beta, dtype, use_gpu, seed=None): 46 with self.test_session(use_gpu=use_gpu, graph=ops.Graph()) as sess: 93 20000, alpha, 1 / scale, dt, use_gpu=False, seed=12345) 155 for use_gpu in [False, True]: 158 10000, alpha, 1.0, dt, use_gpu=use_gpu, seed=12345) 163 failures += [(use_gpu, dt)] 176 for use_gpu in [False, True]: 178 sampler = self._Sampler(1000, 2.0, 1.0, dt, use_gpu=use_gpu [all...] |
/external/tensorflow/tensorflow/python/keras/_impl/keras/layers/ |
pooling_test.py | 29 with self.test_session(use_gpu=True): 36 with self.test_session(use_gpu=True): 55 with self.test_session(use_gpu=True): 78 with self.test_session(use_gpu=True): 90 with self.test_session(use_gpu=True): 121 with self.test_session(use_gpu=True): 140 with self.test_session(use_gpu=True): 161 with self.test_session(use_gpu=True): 171 with self.test_session(use_gpu=True):
|
/external/tensorflow/tensorflow/contrib/reduce_slice_ops/python/kernel_tests/ |
reduce_slice_ops_test.py | 34 with self.test_session(use_gpu=True): 43 with self.test_session(use_gpu=True): 56 with self.test_session(use_gpu=True): 69 with self.test_session(use_gpu=True): 79 with self.test_session(use_gpu=True): 88 with self.test_session(use_gpu=True): 97 with self.test_session(use_gpu=True): 106 with self.test_session(use_gpu=True): 114 with self.test_session(use_gpu=True): 122 with self.test_session(use_gpu=True) [all...] |
/external/tensorflow/tensorflow/python/ops/ |
nn_fused_batchnorm_test.py | 60 use_gpu=True, 69 with self.test_session(use_gpu=use_gpu) as sess: 112 use_gpu=True, 118 with self.test_session(use_gpu=use_gpu) as sess: 185 use_gpu=True, 193 with self.test_session(use_gpu=use_gpu): 245 use_gpu=True [all...] |
/external/tensorflow/tensorflow/contrib/rnn/python/kernel_tests/ |
rnn_test.py | 44 use_gpu, 101 def _testStackBidirectionalRNN(self, use_gpu, use_shape): 102 with self.test_session(use_gpu=use_gpu, graph=ops.Graph()) as sess: 104 self._createStackBidirectionalRNN(use_gpu, use_shape, True)) 153 def _testStackBidirectionalRNNStates(self, use_gpu): 162 with self.test_session(use_gpu=use_gpu, graph=ops.Graph()) as sess: 177 self._createStackBidirectionalRNN(use_gpu, True, True, 216 self._testStackBidirectionalRNN(use_gpu=False, use_shape=False [all...] |