How to use test_session method in Airtest

Best Python code snippet using Airtest

ops_test.py

Source:ops_test.py Github

copy

Full Screen

...24from inception.slim import variables25class ConvTest(tf.test.TestCase):26 def testCreateConv(self):27 height, width = 3, 328 with self.test_session():29 images = tf.random_uniform((5, height, width, 3), seed=1)30 output = ops.conv2d(images, 32, [3, 3])31 self.assertEquals(output.op.name, 'Conv/Relu')32 self.assertListEqual(33 output.get_shape().as_list(), [34 5, height, width, 32])35 def testCreateSquareConv(self):36 height, width = 3, 337 with self.test_session():38 images = tf.random_uniform((5, height, width, 3), seed=1)39 output = ops.conv2d(images, 32, 3)40 self.assertEquals(output.op.name, 'Conv/Relu')41 self.assertListEqual(42 output.get_shape().as_list(), [43 5, height, width, 32])44 def testCreateConvWithTensorShape(self):45 height, width = 3, 346 with self.test_session():47 images = tf.random_uniform((5, height, width, 3), seed=1)48 output = ops.conv2d(images, 32, images.get_shape()[1:3])49 self.assertEquals(output.op.name, 'Conv/Relu')50 self.assertListEqual(51 output.get_shape().as_list(), [52 5, height, width, 32])53 def testCreateFullyConv(self):54 height, width = 6, 655 with self.test_session():56 images = tf.random_uniform((5, height, width, 32), seed=1)57 output = ops.conv2d(58 images, 64, images.get_shape()[59 1:3], padding='VALID')60 self.assertEquals(output.op.name, 'Conv/Relu')61 self.assertListEqual(output.get_shape().as_list(), [5, 1, 1, 64])62 def testCreateVerticalConv(self):63 height, width = 3, 364 with self.test_session():65 images = tf.random_uniform((5, height, width, 3), seed=1)66 output = ops.conv2d(images, 32, [3, 1])67 self.assertEquals(output.op.name, 'Conv/Relu')68 self.assertListEqual(output.get_shape().as_list(),69 [5, height, width, 32])70 def testCreateHorizontalConv(self):71 height, width = 3, 372 with self.test_session():73 images = tf.random_uniform((5, height, width, 3), seed=1)74 output = ops.conv2d(images, 32, [1, 3])75 self.assertEquals(output.op.name, 'Conv/Relu')76 self.assertListEqual(output.get_shape().as_list(),77 [5, height, width, 32])78 def testCreateConvWithStride(self):79 height, width = 6, 680 with self.test_session():81 images = tf.random_uniform((5, height, width, 3), seed=1)82 output = ops.conv2d(images, 32, [3, 3], stride=2)83 self.assertEquals(output.op.name, 'Conv/Relu')84 self.assertListEqual(output.get_shape().as_list(),85 [5, height / 2, width / 2, 32])86 def testCreateConvCreatesWeightsAndBiasesVars(self):87 height, width = 3, 388 images = tf.random_uniform((5, height, width, 3), seed=1)89 with self.test_session():90 self.assertFalse(variables.get_variables('conv1/weights'))91 self.assertFalse(variables.get_variables('conv1/biases'))92 ops.conv2d(images, 32, [3, 3], scope='conv1')93 self.assertTrue(variables.get_variables('conv1/weights'))94 self.assertTrue(variables.get_variables('conv1/biases'))95 def testCreateConvWithScope(self):96 height, width = 3, 397 with self.test_session():98 images = tf.random_uniform((5, height, width, 3), seed=1)99 output = ops.conv2d(images, 32, [3, 3], scope='conv1')100 self.assertEquals(output.op.name, 'conv1/Relu')101 def testCreateConvWithoutActivation(self):102 height, width = 3, 3103 with self.test_session():104 images = tf.random_uniform((5, height, width, 3), seed=1)105 output = ops.conv2d(images, 32, [3, 3], activation=None)106 self.assertEquals(output.op.name, 'Conv/BiasAdd')107 def testCreateConvValid(self):108 height, width = 3, 3109 with self.test_session():110 images = tf.random_uniform((5, height, width, 3), seed=1)111 output = ops.conv2d(images, 32, [3, 3], padding='VALID')112 self.assertListEqual(output.get_shape().as_list(), [5, 1, 1, 32])113 def testCreateConvWithWD(self):114 height, width = 3, 3115 with self.test_session() as sess:116 images = tf.random_uniform((5, height, width, 3), seed=1)117 ops.conv2d(images, 32, [3, 3], weight_decay=0.01)118 wd = tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES)[0]119 self.assertEquals(wd.op.name,120 'Conv/weights/Regularizer/L2Regularizer/value')121 sess.run(tf.initialize_all_variables())122 self.assertTrue(sess.run(wd) <= 0.01)123 def testCreateConvWithoutWD(self):124 height, width = 3, 3125 with self.test_session():126 images = tf.random_uniform((5, height, width, 3), seed=1)127 ops.conv2d(images, 32, [3, 3], weight_decay=0)128 self.assertEquals(129 tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES), [])130 def testReuseVars(self):131 height, width = 3, 3132 with self.test_session():133 images = tf.random_uniform((5, height, width, 3), seed=1)134 ops.conv2d(images, 32, [3, 3], scope='conv1')135 self.assertEquals(len(variables.get_variables()), 2)136 ops.conv2d(images, 32, [3, 3], scope='conv1', reuse=True)137 self.assertEquals(len(variables.get_variables()), 2)138 def testNonReuseVars(self):139 height, width = 3, 3140 with self.test_session():141 images = tf.random_uniform((5, height, width, 3), seed=1)142 ops.conv2d(images, 32, [3, 3])143 self.assertEquals(len(variables.get_variables()), 2)144 ops.conv2d(images, 32, [3, 3])145 self.assertEquals(len(variables.get_variables()), 4)146 def testReuseConvWithWD(self):147 height, width = 3, 3148 with self.test_session():149 images = tf.random_uniform((5, height, width, 3), seed=1)150 ops.conv2d(images, 32, [3, 3], weight_decay=0.01, scope='conv1')151 self.assertEquals(len(variables.get_variables()), 2)152 self.assertEquals(153 len(tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES)), 1)154 ops.conv2d(images, 32, [3, 3], weight_decay=0.01, scope='conv1',155 reuse=True)156 self.assertEquals(len(variables.get_variables()), 2)157 self.assertEquals(158 len(tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES)), 1)159 def testConvWithBatchNorm(self):160 height, width = 3, 3161 with self.test_session():162 images = tf.random_uniform((5, height, width, 32), seed=1)163 with scopes.arg_scope([ops.conv2d], batch_norm_params={'decay': 0.9}):164 net = ops.conv2d(images, 32, [3, 3])165 net = ops.conv2d(net, 32, [3, 3])166 self.assertEquals(len(variables.get_variables()), 8)167 self.assertEquals(168 len(variables.get_variables('Conv/BatchNorm')), 3)169 self.assertEquals(170 len(variables.get_variables('Conv_1/BatchNorm')), 3)171 def testReuseConvWithBatchNorm(self):172 height, width = 3, 3173 with self.test_session():174 images = tf.random_uniform((5, height, width, 32), seed=1)175 with scopes.arg_scope([ops.conv2d], batch_norm_params={'decay': 0.9}):176 net = ops.conv2d(images, 32, [3, 3], scope='Conv')177 net = ops.conv2d(net, 32, [3, 3], scope='Conv', reuse=True)178 self.assertEquals(len(variables.get_variables()), 4)179 self.assertEquals(180 len(variables.get_variables('Conv/BatchNorm')), 3)181 self.assertEquals(182 len(variables.get_variables('Conv_1/BatchNorm')), 0)183class FCTest(tf.test.TestCase):184 def testCreateFC(self):185 height, width = 3, 3186 with self.test_session():187 inputs = tf.random_uniform((5, height * width * 3), seed=1)188 output = ops.fc(inputs, 32)189 self.assertEquals(output.op.name, 'FC/Relu')190 self.assertListEqual(output.get_shape().as_list(), [5, 32])191 def testCreateFCWithScope(self):192 height, width = 3, 3193 with self.test_session():194 inputs = tf.random_uniform((5, height * width * 3), seed=1)195 output = ops.fc(inputs, 32, scope='fc1')196 self.assertEquals(output.op.name, 'fc1/Relu')197 def testCreateFcCreatesWeightsAndBiasesVars(self):198 height, width = 3, 3199 inputs = tf.random_uniform((5, height * width * 3), seed=1)200 with self.test_session():201 self.assertFalse(variables.get_variables('fc1/weights'))202 self.assertFalse(variables.get_variables('fc1/biases'))203 ops.fc(inputs, 32, scope='fc1')204 self.assertTrue(variables.get_variables('fc1/weights'))205 self.assertTrue(variables.get_variables('fc1/biases'))206 def testReuseVars(self):207 height, width = 3, 3208 inputs = tf.random_uniform((5, height * width * 3), seed=1)209 with self.test_session():210 ops.fc(inputs, 32, scope='fc1')211 self.assertEquals(len(variables.get_variables('fc1')), 2)212 ops.fc(inputs, 32, scope='fc1', reuse=True)213 self.assertEquals(len(variables.get_variables('fc1')), 2)214 def testNonReuseVars(self):215 height, width = 3, 3216 inputs = tf.random_uniform((5, height * width * 3), seed=1)217 with self.test_session():218 ops.fc(inputs, 32)219 self.assertEquals(len(variables.get_variables('FC')), 2)220 ops.fc(inputs, 32)221 self.assertEquals(len(variables.get_variables('FC')), 4)222 def testCreateFCWithoutActivation(self):223 height, width = 3, 3224 with self.test_session():225 inputs = tf.random_uniform((5, height * width * 3), seed=1)226 output = ops.fc(inputs, 32, activation=None)227 self.assertEquals(output.op.name, 'FC/xw_plus_b')228 def testCreateFCWithWD(self):229 height, width = 3, 3230 with self.test_session() as sess:231 inputs = tf.random_uniform((5, height * width * 3), seed=1)232 ops.fc(inputs, 32, weight_decay=0.01)233 wd = tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES)[0]234 self.assertEquals(wd.op.name,235 'FC/weights/Regularizer/L2Regularizer/value')236 sess.run(tf.initialize_all_variables())237 self.assertTrue(sess.run(wd) <= 0.01)238 def testCreateFCWithoutWD(self):239 height, width = 3, 3240 with self.test_session():241 inputs = tf.random_uniform((5, height * width * 3), seed=1)242 ops.fc(inputs, 32, weight_decay=0)243 self.assertEquals(244 tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES), [])245 def testReuseFCWithWD(self):246 height, width = 3, 3247 with self.test_session():248 inputs = tf.random_uniform((5, height * width * 3), seed=1)249 ops.fc(inputs, 32, weight_decay=0.01, scope='fc')250 self.assertEquals(len(variables.get_variables()), 2)251 self.assertEquals(252 len(tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES)), 1)253 ops.fc(inputs, 32, weight_decay=0.01, scope='fc', reuse=True)254 self.assertEquals(len(variables.get_variables()), 2)255 self.assertEquals(256 len(tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES)), 1)257 def testFCWithBatchNorm(self):258 height, width = 3, 3259 with self.test_session():260 images = tf.random_uniform((5, height * width * 3), seed=1)261 with scopes.arg_scope([ops.fc], batch_norm_params={}):262 net = ops.fc(images, 27)263 net = ops.fc(net, 27)264 self.assertEquals(len(variables.get_variables()), 8)265 self.assertEquals(len(variables.get_variables('FC/BatchNorm')), 3)266 self.assertEquals(267 len(variables.get_variables('FC_1/BatchNorm')), 3)268 def testReuseFCWithBatchNorm(self):269 height, width = 3, 3270 with self.test_session():271 images = tf.random_uniform((5, height * width * 3), seed=1)272 with scopes.arg_scope([ops.fc], batch_norm_params={'decay': 0.9}):273 net = ops.fc(images, 27, scope='fc1')274 net = ops.fc(net, 27, scope='fc1', reuse=True)275 self.assertEquals(len(variables.get_variables()), 4)276 self.assertEquals(len(variables.get_variables('fc1/BatchNorm')), 3)277class MaxPoolTest(tf.test.TestCase):278 def testCreateMaxPool(self):279 height, width = 3, 3280 with self.test_session():281 images = tf.random_uniform((5, height, width, 3), seed=1)282 output = ops.max_pool(images, [3, 3])283 self.assertEquals(output.op.name, 'MaxPool/MaxPool')284 self.assertListEqual(output.get_shape().as_list(), [5, 1, 1, 3])285 def testCreateSquareMaxPool(self):286 height, width = 3, 3287 with self.test_session():288 images = tf.random_uniform((5, height, width, 3), seed=1)289 output = ops.max_pool(images, 3)290 self.assertEquals(output.op.name, 'MaxPool/MaxPool')291 self.assertListEqual(output.get_shape().as_list(), [5, 1, 1, 3])292 def testCreateMaxPoolWithScope(self):293 height, width = 3, 3294 with self.test_session():295 images = tf.random_uniform((5, height, width, 3), seed=1)296 output = ops.max_pool(images, [3, 3], scope='pool1')297 self.assertEquals(output.op.name, 'pool1/MaxPool')298 def testCreateMaxPoolSAME(self):299 height, width = 3, 3300 with self.test_session():301 images = tf.random_uniform((5, height, width, 3), seed=1)302 output = ops.max_pool(images, [3, 3], padding='SAME')303 self.assertListEqual(output.get_shape().as_list(), [5, 2, 2, 3])304 def testCreateMaxPoolStrideSAME(self):305 height, width = 3, 3306 with self.test_session():307 images = tf.random_uniform((5, height, width, 3), seed=1)308 output = ops.max_pool(images, [3, 3], stride=1, padding='SAME')309 self.assertListEqual(310 output.get_shape().as_list(), [311 5, height, width, 3])312 def testGlobalMaxPool(self):313 height, width = 3, 3314 with self.test_session():315 images = tf.random_uniform((5, height, width, 3), seed=1)316 output = ops.max_pool(images, images.get_shape()[1:3], stride=1)317 self.assertListEqual(output.get_shape().as_list(), [5, 1, 1, 3])318class AvgPoolTest(tf.test.TestCase):319 def testCreateAvgPool(self):320 height, width = 3, 3321 with self.test_session():322 images = tf.random_uniform((5, height, width, 3), seed=1)323 output = ops.avg_pool(images, [3, 3])324 self.assertEquals(output.op.name, 'AvgPool/AvgPool')325 self.assertListEqual(output.get_shape().as_list(), [5, 1, 1, 3])326 def testCreateSquareAvgPool(self):327 height, width = 3, 3328 with self.test_session():329 images = tf.random_uniform((5, height, width, 3), seed=1)330 output = ops.avg_pool(images, 3)331 self.assertEquals(output.op.name, 'AvgPool/AvgPool')332 self.assertListEqual(output.get_shape().as_list(), [5, 1, 1, 3])333 def testCreateAvgPoolWithScope(self):334 height, width = 3, 3335 with self.test_session():336 images = tf.random_uniform((5, height, width, 3), seed=1)337 output = ops.avg_pool(images, [3, 3], scope='pool1')338 self.assertEquals(output.op.name, 'pool1/AvgPool')339 def testCreateAvgPoolSAME(self):340 height, width = 3, 3341 with self.test_session():342 images = tf.random_uniform((5, height, width, 3), seed=1)343 output = ops.avg_pool(images, [3, 3], padding='SAME')344 self.assertListEqual(output.get_shape().as_list(), [5, 2, 2, 3])345 def testCreateAvgPoolStrideSAME(self):346 height, width = 3, 3347 with self.test_session():348 images = tf.random_uniform((5, height, width, 3), seed=1)349 output = ops.avg_pool(images, [3, 3], stride=1, padding='SAME')350 self.assertListEqual(351 output.get_shape().as_list(), [352 5, height, width, 3])353 def testGlobalAvgPool(self):354 height, width = 3, 3355 with self.test_session():356 images = tf.random_uniform((5, height, width, 3), seed=1)357 output = ops.avg_pool(images, images.get_shape()[1:3], stride=1)358 self.assertListEqual(output.get_shape().as_list(), [5, 1, 1, 3])359class OneHotEncodingTest(tf.test.TestCase):360 def testOneHotEncodingCreate(self):361 with self.test_session():362 labels = tf.constant([0, 1, 2])363 output = ops.one_hot_encoding(labels, num_classes=3)364 self.assertEquals(output.op.name, 'OneHotEncoding/SparseToDense')365 self.assertListEqual(output.get_shape().as_list(), [3, 3])366 def testOneHotEncoding(self):367 with self.test_session():368 labels = tf.constant([0, 1, 2])369 one_hot_labels = tf.constant([[1, 0, 0],370 [0, 1, 0],371 [0, 0, 1]])372 output = ops.one_hot_encoding(labels, num_classes=3)373 self.assertAllClose(output.eval(), one_hot_labels.eval())374class DropoutTest(tf.test.TestCase):375 def testCreateDropout(self):376 height, width = 3, 3377 with self.test_session():378 images = tf.random_uniform((5, height, width, 3), seed=1)379 output = ops.dropout(images)380 self.assertEquals(output.op.name, 'Dropout/dropout/mul_1')381 output.get_shape().assert_is_compatible_with(images.get_shape())382 def testCreateDropoutNoTraining(self):383 height, width = 3, 3384 with self.test_session():385 images = tf.random_uniform(386 (5, height, width, 3), seed=1, name='images')387 output = ops.dropout(images, is_training=False)388 self.assertEquals(output, images)389class FlattenTest(tf.test.TestCase):390 def testFlatten4D(self):391 height, width = 3, 3392 with self.test_session():393 images = tf.random_uniform(394 (5, height, width, 3), seed=1, name='images')395 output = ops.flatten(images)396 self.assertEquals(output.get_shape().num_elements(),397 images.get_shape().num_elements())398 self.assertEqual(output.get_shape()[0], images.get_shape()[0])399 def testFlatten3D(self):400 height, width = 3, 3401 with self.test_session():402 images = tf.random_uniform(403 (5, height, width), seed=1, name='images')404 output = ops.flatten(images)405 self.assertEquals(output.get_shape().num_elements(),406 images.get_shape().num_elements())407 self.assertEqual(output.get_shape()[0], images.get_shape()[0])408 def testFlattenBatchSize(self):409 height, width = 3, 3410 with self.test_session() as sess:411 images = tf.random_uniform(412 (5, height, width, 3), seed=1, name='images')413 inputs = tf.placeholder(tf.int32, (None, height, width, 3))414 output = ops.flatten(inputs)415 self.assertEquals(output.get_shape().as_list(),416 [None, height * width * 3])417 output = sess.run(output, {inputs: images.eval()})418 self.assertEquals(output.size,419 images.get_shape().num_elements())420 self.assertEqual(output.shape[0], images.get_shape()[0])421class BatchNormTest(tf.test.TestCase):422 def testCreateOp(self):423 height, width = 3, 3424 with self.test_session():425 images = tf.random_uniform((5, height, width, 3), seed=1)426 output = ops.batch_norm(images)427 self.assertTrue(output.op.name.startswith('BatchNorm/batchnorm'))428 self.assertListEqual(429 output.get_shape().as_list(), [430 5, height, width, 3])431 def testCreateVariables(self):432 height, width = 3, 3433 with self.test_session():434 images = tf.random_uniform((5, height, width, 3), seed=1)435 ops.batch_norm(images)436 beta = variables.get_variables_by_name('beta')[0]437 self.assertEquals(beta.op.name, 'BatchNorm/beta')438 gamma = variables.get_variables_by_name('gamma')439 self.assertEquals(gamma, [])440 moving_mean = tf.moving_average_variables()[0]441 moving_variance = tf.moving_average_variables()[1]442 self.assertEquals(moving_mean.op.name, 'BatchNorm/moving_mean')443 self.assertEquals(444 moving_variance.op.name,445 'BatchNorm/moving_variance')446 def testCreateVariablesWithScale(self):447 height, width = 3, 3448 with self.test_session():449 images = tf.random_uniform((5, height, width, 3), seed=1)450 ops.batch_norm(images, scale=True)451 beta = variables.get_variables_by_name('beta')[0]452 gamma = variables.get_variables_by_name('gamma')[0]453 self.assertEquals(beta.op.name, 'BatchNorm/beta')454 self.assertEquals(gamma.op.name, 'BatchNorm/gamma')455 moving_mean = tf.moving_average_variables()[0]456 moving_variance = tf.moving_average_variables()[1]457 self.assertEquals(moving_mean.op.name, 'BatchNorm/moving_mean')458 self.assertEquals(459 moving_variance.op.name,460 'BatchNorm/moving_variance')461 def testCreateVariablesWithoutCenterWithScale(self):462 height, width = 3, 3463 with self.test_session():464 images = tf.random_uniform((5, height, width, 3), seed=1)465 ops.batch_norm(images, center=False, scale=True)466 beta = variables.get_variables_by_name('beta')467 self.assertEquals(beta, [])468 gamma = variables.get_variables_by_name('gamma')[0]469 self.assertEquals(gamma.op.name, 'BatchNorm/gamma')470 moving_mean = tf.moving_average_variables()[0]471 moving_variance = tf.moving_average_variables()[1]472 self.assertEquals(moving_mean.op.name, 'BatchNorm/moving_mean')473 self.assertEquals(474 moving_variance.op.name,475 'BatchNorm/moving_variance')476 def testCreateVariablesWithoutCenterWithoutScale(self):477 height, width = 3, 3478 with self.test_session():479 images = tf.random_uniform((5, height, width, 3), seed=1)480 ops.batch_norm(images, center=False, scale=False)481 beta = variables.get_variables_by_name('beta')482 self.assertEquals(beta, [])483 gamma = variables.get_variables_by_name('gamma')484 self.assertEquals(gamma, [])485 moving_mean = tf.moving_average_variables()[0]486 moving_variance = tf.moving_average_variables()[1]487 self.assertEquals(moving_mean.op.name, 'BatchNorm/moving_mean')488 self.assertEquals(489 moving_variance.op.name,490 'BatchNorm/moving_variance')491 def testMovingAverageVariables(self):492 height, width = 3, 3493 with self.test_session():494 images = tf.random_uniform((5, height, width, 3), seed=1)495 ops.batch_norm(images, scale=True)496 moving_mean = tf.moving_average_variables()[0]497 moving_variance = tf.moving_average_variables()[1]498 self.assertEquals(moving_mean.op.name, 'BatchNorm/moving_mean')499 self.assertEquals(500 moving_variance.op.name,501 'BatchNorm/moving_variance')502 def testUpdateOps(self):503 height, width = 3, 3504 with self.test_session():505 images = tf.random_uniform((5, height, width, 3), seed=1)506 ops.batch_norm(images)507 update_ops = tf.get_collection(ops.UPDATE_OPS_COLLECTION)508 update_moving_mean = update_ops[0]509 update_moving_variance = update_ops[1]510 self.assertEquals(update_moving_mean.op.name,511 'BatchNorm/AssignMovingAvg')512 self.assertEquals(update_moving_variance.op.name,513 'BatchNorm/AssignMovingAvg_1')514 def testReuseVariables(self):515 height, width = 3, 3516 with self.test_session():517 images = tf.random_uniform((5, height, width, 3), seed=1)518 ops.batch_norm(images, scale=True, scope='bn')519 ops.batch_norm(images, scale=True, scope='bn', reuse=True)520 beta = variables.get_variables_by_name('beta')521 gamma = variables.get_variables_by_name('gamma')522 self.assertEquals(len(beta), 1)523 self.assertEquals(len(gamma), 1)524 moving_vars = tf.get_collection('moving_vars')525 self.assertEquals(len(moving_vars), 2)526 def testReuseUpdateOps(self):527 height, width = 3, 3528 with self.test_session():529 images = tf.random_uniform((5, height, width, 3), seed=1)530 ops.batch_norm(images, scope='bn')531 self.assertEquals(532 len(tf.get_collection(ops.UPDATE_OPS_COLLECTION)), 2)533 ops.batch_norm(images, scope='bn', reuse=True)534 self.assertEquals(535 len(tf.get_collection(ops.UPDATE_OPS_COLLECTION)), 4)536 def testCreateMovingVars(self):537 height, width = 3, 3538 with self.test_session():539 images = tf.random_uniform((5, height, width, 3), seed=1)540 _ = ops.batch_norm(images, moving_vars='moving_vars')541 moving_mean = tf.get_collection('moving_vars',542 'BatchNorm/moving_mean')543 self.assertEquals(len(moving_mean), 1)544 self.assertEquals(moving_mean[0].op.name, 'BatchNorm/moving_mean')545 moving_variance = tf.get_collection('moving_vars',546 'BatchNorm/moving_variance')547 self.assertEquals(len(moving_variance), 1)548 self.assertEquals(549 moving_variance[0].op.name,550 'BatchNorm/moving_variance')551 def testComputeMovingVars(self):552 height, width = 3, 3553 with self.test_session() as sess:554 image_shape = (10, height, width, 3)555 image_values = np.random.rand(*image_shape)556 expected_mean = np.mean(image_values, axis=(0, 1, 2))557 expected_var = np.var(image_values, axis=(0, 1, 2))558 images = tf.constant(559 image_values,560 shape=image_shape,561 dtype=tf.float32)562 output = ops.batch_norm(images, decay=0.1)563 update_ops = tf.get_collection(ops.UPDATE_OPS_COLLECTION)564 with tf.control_dependencies(update_ops):565 barrier = tf.no_op(name='gradient_barrier')566 output = control_flow_ops.with_dependencies([barrier], output)567 # Initialize all variables568 sess.run(tf.initialize_all_variables())569 moving_mean = variables.get_variables('BatchNorm/moving_mean')[0]570 moving_variance = variables.get_variables(571 'BatchNorm/moving_variance')[0]572 mean, variance = sess.run([moving_mean, moving_variance])573 # After initialization moving_mean == 0 and moving_variance == 1.574 self.assertAllClose(mean, [0] * 3)575 self.assertAllClose(variance, [1] * 3)576 for _ in range(10):577 sess.run([output])578 mean = moving_mean.eval()579 variance = moving_variance.eval()580 # After 10 updates with decay 0.1 moving_mean == expected_mean and581 # moving_variance == expected_var.582 self.assertAllClose(mean, expected_mean)583 self.assertAllClose(variance, expected_var)584 def testEvalMovingVars(self):585 height, width = 3, 3586 with self.test_session() as sess:587 image_shape = (10, height, width, 3)588 image_values = np.random.rand(*image_shape)589 expected_mean = np.mean(image_values, axis=(0, 1, 2))590 expected_var = np.var(image_values, axis=(0, 1, 2))591 images = tf.constant(592 image_values,593 shape=image_shape,594 dtype=tf.float32)595 output = ops.batch_norm(images, decay=0.1, is_training=False)596 update_ops = tf.get_collection(ops.UPDATE_OPS_COLLECTION)597 with tf.control_dependencies(update_ops):598 barrier = tf.no_op(name='gradient_barrier')599 output = control_flow_ops.with_dependencies([barrier], output)600 # Initialize all variables601 sess.run(tf.initialize_all_variables())602 moving_mean = variables.get_variables('BatchNorm/moving_mean')[0]603 moving_variance = variables.get_variables(604 'BatchNorm/moving_variance')[0]605 mean, variance = sess.run([moving_mean, moving_variance])606 # After initialization moving_mean == 0 and moving_variance == 1.607 self.assertAllClose(mean, [0] * 3)608 self.assertAllClose(variance, [1] * 3)609 # Simulate assigment from saver restore.610 init_assigns = [tf.assign(moving_mean, expected_mean),611 tf.assign(moving_variance, expected_var)]612 sess.run(init_assigns)613 for _ in range(10):614 sess.run([output], {images: np.random.rand(*image_shape)})615 mean = moving_mean.eval()616 variance = moving_variance.eval()617 # Although we feed different images, the moving_mean and moving_variance618 # shouldn't change.619 self.assertAllClose(mean, expected_mean)620 self.assertAllClose(variance, expected_var)621 def testReuseVars(self):622 height, width = 3, 3623 with self.test_session() as sess:624 image_shape = (10, height, width, 3)625 image_values = np.random.rand(*image_shape)626 expected_mean = np.mean(image_values, axis=(0, 1, 2))627 expected_var = np.var(image_values, axis=(0, 1, 2))628 images = tf.constant(629 image_values,630 shape=image_shape,631 dtype=tf.float32)632 output = ops.batch_norm(images, decay=0.1, is_training=False)633 update_ops = tf.get_collection(ops.UPDATE_OPS_COLLECTION)634 with tf.control_dependencies(update_ops):635 barrier = tf.no_op(name='gradient_barrier')636 output = control_flow_ops.with_dependencies([barrier], output)637 # Initialize all variables...

Full Screen

Full Screen

variables_test.py

Source:variables_test.py Github

copy

Full Screen

...20from inception.slim import scopes21from inception.slim import variables22class VariablesTest(tf.test.TestCase):23 def testCreateVariable(self):24 with self.test_session():25 with tf.variable_scope('A'):26 a = variables.variable('a', [5])27 self.assertEquals(a.op.name, 'A/a')28 self.assertListEqual(a.get_shape().as_list(), [5])29 def testGetVariables(self):30 with self.test_session():31 with tf.variable_scope('A'):32 a = variables.variable('a', [5])33 with tf.variable_scope('B'):34 b = variables.variable('a', [5])35 self.assertEquals([a, b], variables.get_variables())36 self.assertEquals([a], variables.get_variables('A'))37 self.assertEquals([b], variables.get_variables('B'))38 def testGetVariablesSuffix(self):39 with self.test_session():40 with tf.variable_scope('A'):41 a = variables.variable('a', [5])42 with tf.variable_scope('A'):43 b = variables.variable('b', [5])44 self.assertEquals([a], variables.get_variables(suffix='a'))45 self.assertEquals([b], variables.get_variables(suffix='b'))46 def testGetVariableWithSingleVar(self):47 with self.test_session():48 with tf.variable_scope('parent'):49 a = variables.variable('child', [5])50 self.assertEquals(a, variables.get_unique_variable('parent/child'))51 def testGetVariableWithDistractors(self):52 with self.test_session():53 with tf.variable_scope('parent'):54 a = variables.variable('child', [5])55 with tf.variable_scope('child'):56 variables.variable('grandchild1', [7])57 variables.variable('grandchild2', [9])58 self.assertEquals(a, variables.get_unique_variable('parent/child'))59 def testGetVariableThrowsExceptionWithNoMatch(self):60 var_name = 'cant_find_me'61 with self.test_session():62 with self.assertRaises(ValueError):63 variables.get_unique_variable(var_name)64 def testGetThrowsExceptionWithChildrenButNoMatch(self):65 var_name = 'parent/child'66 with self.test_session():67 with tf.variable_scope(var_name):68 variables.variable('grandchild1', [7])69 variables.variable('grandchild2', [9])70 with self.assertRaises(ValueError):71 variables.get_unique_variable(var_name)72 def testGetVariablesToRestore(self):73 with self.test_session():74 with tf.variable_scope('A'):75 a = variables.variable('a', [5])76 with tf.variable_scope('B'):77 b = variables.variable('a', [5])78 self.assertEquals([a, b], variables.get_variables_to_restore())79 def testNoneGetVariablesToRestore(self):80 with self.test_session():81 with tf.variable_scope('A'):82 a = variables.variable('a', [5], restore=False)83 with tf.variable_scope('B'):84 b = variables.variable('a', [5], restore=False)85 self.assertEquals([], variables.get_variables_to_restore())86 self.assertEquals([a, b], variables.get_variables())87 def testGetMixedVariablesToRestore(self):88 with self.test_session():89 with tf.variable_scope('A'):90 a = variables.variable('a', [5])91 b = variables.variable('b', [5], restore=False)92 with tf.variable_scope('B'):93 c = variables.variable('c', [5])94 d = variables.variable('d', [5], restore=False)95 self.assertEquals([a, b, c, d], variables.get_variables())96 self.assertEquals([a, c], variables.get_variables_to_restore())97 def testReuseVariable(self):98 with self.test_session():99 with tf.variable_scope('A'):100 a = variables.variable('a', [])101 with tf.variable_scope('A', reuse=True):102 b = variables.variable('a', [])103 self.assertEquals(a, b)104 self.assertListEqual([a], variables.get_variables())105 def testVariableWithDevice(self):106 with self.test_session():107 with tf.variable_scope('A'):108 a = variables.variable('a', [], device='cpu:0')109 b = variables.variable('b', [], device='cpu:1')110 self.assertDeviceEqual(a.device, 'cpu:0')111 self.assertDeviceEqual(b.device, 'cpu:1')112 def testVariableWithDeviceFromScope(self):113 with self.test_session():114 with tf.device('/cpu:0'):115 a = variables.variable('a', [])116 b = variables.variable('b', [], device='cpu:1')117 self.assertDeviceEqual(a.device, 'cpu:0')118 self.assertDeviceEqual(b.device, 'cpu:1')119 def testVariableWithDeviceFunction(self):120 class DevFn(object):121 def __init__(self):122 self.counter = -1123 def __call__(self, op):124 self.counter += 1125 return 'cpu:%d' % self.counter126 with self.test_session():127 with scopes.arg_scope([variables.variable], device=DevFn()):128 a = variables.variable('a', [])129 b = variables.variable('b', [])130 c = variables.variable('c', [], device='cpu:12')131 d = variables.variable('d', [])132 with tf.device('cpu:99'):133 e_init = tf.constant(12)134 e = variables.variable('e', initializer=e_init)135 self.assertDeviceEqual(a.device, 'cpu:0')136 self.assertDeviceEqual(a.initial_value.device, 'cpu:0')137 self.assertDeviceEqual(b.device, 'cpu:1')138 self.assertDeviceEqual(b.initial_value.device, 'cpu:1')139 self.assertDeviceEqual(c.device, 'cpu:12')140 self.assertDeviceEqual(c.initial_value.device, 'cpu:12')141 self.assertDeviceEqual(d.device, 'cpu:2')142 self.assertDeviceEqual(d.initial_value.device, 'cpu:2')143 self.assertDeviceEqual(e.device, 'cpu:3')144 self.assertDeviceEqual(e.initial_value.device, 'cpu:99')145 def testVariableWithReplicaDeviceSetter(self):146 with self.test_session():147 with tf.device(tf.train.replica_device_setter(ps_tasks=2)):148 a = variables.variable('a', [])149 b = variables.variable('b', [])150 c = variables.variable('c', [], device='cpu:12')151 d = variables.variable('d', [])152 with tf.device('cpu:99'):153 e_init = tf.constant(12)154 e = variables.variable('e', initializer=e_init)155 # The values below highlight how the replica_device_setter puts initial156 # values on the worker job, and how it merges explicit devices.157 self.assertDeviceEqual(a.device, '/job:ps/task:0/cpu:0')158 self.assertDeviceEqual(a.initial_value.device, '/job:worker/cpu:0')159 self.assertDeviceEqual(b.device, '/job:ps/task:1/cpu:0')160 self.assertDeviceEqual(b.initial_value.device, '/job:worker/cpu:0')161 self.assertDeviceEqual(c.device, '/job:ps/task:0/cpu:12')162 self.assertDeviceEqual(163 c.initial_value.device,164 '/job:worker/cpu:12')165 self.assertDeviceEqual(d.device, '/job:ps/task:1/cpu:0')166 self.assertDeviceEqual(d.initial_value.device, '/job:worker/cpu:0')167 self.assertDeviceEqual(e.device, '/job:ps/task:0/cpu:0')168 self.assertDeviceEqual(169 e.initial_value.device,170 '/job:worker/cpu:99')171 def testVariableWithVariableDeviceChooser(self):172 with tf.Graph().as_default():173 device_fn = variables.VariableDeviceChooser(174 num_parameter_servers=2)175 with scopes.arg_scope([variables.variable], device=device_fn):176 a = variables.variable('a', [])177 b = variables.variable('b', [])178 c = variables.variable('c', [], device='cpu:12')179 d = variables.variable('d', [])180 with tf.device('cpu:99'):181 e_init = tf.constant(12)182 e = variables.variable('e', initializer=e_init)183 # The values below highlight how the VariableDeviceChooser puts initial184 # values on the same device as the variable job.185 self.assertDeviceEqual(a.device, '/job:ps/task:0/cpu:0')186 self.assertDeviceEqual(a.initial_value.device, a.device)187 self.assertDeviceEqual(b.device, '/job:ps/task:1/cpu:0')188 self.assertDeviceEqual(b.initial_value.device, b.device)189 self.assertDeviceEqual(c.device, '/cpu:12')190 self.assertDeviceEqual(c.initial_value.device, c.device)191 self.assertDeviceEqual(d.device, '/job:ps/task:0/cpu:0')192 self.assertDeviceEqual(d.initial_value.device, d.device)193 self.assertDeviceEqual(e.device, '/job:ps/task:1/cpu:0')194 self.assertDeviceEqual(e.initial_value.device, '/cpu:99')195 def testVariableGPUPlacement(self):196 with tf.Graph().as_default():197 device_fn = variables.VariableDeviceChooser(placement='gpu:0')198 with scopes.arg_scope([variables.variable], device=device_fn):199 a = variables.variable('a', [])200 b = variables.variable('b', [])201 c = variables.variable('c', [], device='cpu:12')202 d = variables.variable('d', [])203 with tf.device('cpu:99'):204 e_init = tf.constant(12)205 e = variables.variable('e', initializer=e_init)206 # The values below highlight how the VariableDeviceChooser puts initial207 # values on the same device as the variable job.208 self.assertDeviceEqual(a.device, '/gpu:0')209 self.assertDeviceEqual(a.initial_value.device, a.device)210 self.assertDeviceEqual(b.device, '/gpu:0')211 self.assertDeviceEqual(b.initial_value.device, b.device)212 self.assertDeviceEqual(c.device, '/cpu:12')213 self.assertDeviceEqual(c.initial_value.device, c.device)214 self.assertDeviceEqual(d.device, '/gpu:0')215 self.assertDeviceEqual(d.initial_value.device, d.device)216 self.assertDeviceEqual(e.device, '/gpu:0')217 self.assertDeviceEqual(e.initial_value.device, '/cpu:99')218 def testVariableCollection(self):219 with self.test_session():220 a = variables.variable('a', [], collections='A')221 b = variables.variable('b', [], collections='B')222 self.assertEquals(a, tf.get_collection('A')[0])223 self.assertEquals(b, tf.get_collection('B')[0])224 def testVariableCollections(self):225 with self.test_session():226 a = variables.variable('a', [], collections=['A', 'C'])227 b = variables.variable('b', [], collections=['B', 'C'])228 self.assertEquals(a, tf.get_collection('A')[0])229 self.assertEquals(b, tf.get_collection('B')[0])230 def testVariableCollectionsWithArgScope(self):231 with self.test_session():232 with scopes.arg_scope([variables.variable], collections='A'):233 a = variables.variable('a', [])234 b = variables.variable('b', [])235 self.assertListEqual([a, b], tf.get_collection('A'))236 def testVariableCollectionsWithArgScopeNested(self):237 with self.test_session():238 with scopes.arg_scope([variables.variable], collections='A'):239 a = variables.variable('a', [])240 with scopes.arg_scope([variables.variable], collections='B'):241 b = variables.variable('b', [])242 self.assertEquals(a, tf.get_collection('A')[0])243 self.assertEquals(b, tf.get_collection('B')[0])244 def testVariableCollectionsWithArgScopeNonNested(self):245 with self.test_session():246 with scopes.arg_scope([variables.variable], collections='A'):247 a = variables.variable('a', [])248 with scopes.arg_scope([variables.variable], collections='B'):249 b = variables.variable('b', [])250 variables.variable('c', [])251 self.assertListEqual([a], tf.get_collection('A'))252 self.assertListEqual([b], tf.get_collection('B'))253 def testVariableRestoreWithArgScopeNested(self):254 with self.test_session():255 with scopes.arg_scope([variables.variable], restore=True):256 a = variables.variable('a', [])257 with scopes.arg_scope([variables.variable],258 trainable=False,259 collections=['A', 'B']):260 b = variables.variable('b', [])261 c = variables.variable('c', [])262 self.assertListEqual(263 [a, b, c], variables.get_variables_to_restore())264 self.assertListEqual([a, c], tf.trainable_variables())265 self.assertListEqual([b], tf.get_collection('A'))266 self.assertListEqual([b], tf.get_collection('B'))267class GetVariablesByNameTest(tf.test.TestCase):268 def testGetVariableGivenNameScoped(self):269 with self.test_session():270 with tf.variable_scope('A'):271 a = variables.variable('a', [5])272 b = variables.variable('b', [5])273 self.assertEquals([a], variables.get_variables_by_name('a'))274 self.assertEquals([b], variables.get_variables_by_name('b'))275 def testGetVariablesByNameReturnsByValueWithScope(self):276 with self.test_session():277 with tf.variable_scope('A'):278 a = variables.variable('a', [5])279 matched_variables = variables.get_variables_by_name('a')280 # If variables.get_variables_by_name returns the list by reference, the281 # following append should persist, and be returned, in subsequent calls282 # to variables.get_variables_by_name('a').283 matched_variables.append(4)284 matched_variables = variables.get_variables_by_name('a')285 self.assertEquals([a], matched_variables)286 def testGetVariablesByNameReturnsByValueWithoutScope(self):287 with self.test_session():288 a = variables.variable('a', [5])289 matched_variables = variables.get_variables_by_name('a')290 # If variables.get_variables_by_name returns the list by reference, the291 # following append should persist, and be returned, in subsequent calls292 # to variables.get_variables_by_name('a').293 matched_variables.append(4)294 matched_variables = variables.get_variables_by_name('a')295 self.assertEquals([a], matched_variables)296class GlobalStepTest(tf.test.TestCase):297 def testStable(self):298 with tf.Graph().as_default():299 gs = variables.global_step()300 gs2 = variables.global_step()301 self.assertTrue(gs is gs2)...

Full Screen

Full Screen

losses_test.py

Source:losses_test.py Github

copy

Full Screen

...19import tensorflow as tf20from inception.slim import losses21class LossesTest(tf.test.TestCase):22 def testL1Loss(self):23 with self.test_session():24 shape = [5, 5, 5]25 num_elem = 5 * 5 * 526 weights = tf.constant(1.0, shape=shape)27 wd = 0.0128 loss = losses.l1_loss(weights, wd)29 self.assertEquals(loss.op.name, 'L1Loss/value')30 self.assertAlmostEqual(loss.eval(), num_elem * wd, 5)31 def testL2Loss(self):32 with self.test_session():33 shape = [5, 5, 5]34 num_elem = 5 * 5 * 535 weights = tf.constant(1.0, shape=shape)36 wd = 0.0137 loss = losses.l2_loss(weights, wd)38 self.assertEquals(loss.op.name, 'L2Loss/value')39 self.assertAlmostEqual(loss.eval(), num_elem * wd / 2, 5)40class RegularizersTest(tf.test.TestCase):41 def testL1Regularizer(self):42 with self.test_session():43 shape = [5, 5, 5]44 num_elem = 5 * 5 * 545 tensor = tf.constant(1.0, shape=shape)46 loss = losses.l1_regularizer()(tensor)47 self.assertEquals(loss.op.name, 'L1Regularizer/value')48 self.assertAlmostEqual(loss.eval(), num_elem, 5)49 def testL1RegularizerWithScope(self):50 with self.test_session():51 shape = [5, 5, 5]52 num_elem = 5 * 5 * 553 tensor = tf.constant(1.0, shape=shape)54 loss = losses.l1_regularizer(scope='L1')(tensor)55 self.assertEquals(loss.op.name, 'L1/value')56 self.assertAlmostEqual(loss.eval(), num_elem, 5)57 def testL1RegularizerWithWeight(self):58 with self.test_session():59 shape = [5, 5, 5]60 num_elem = 5 * 5 * 561 tensor = tf.constant(1.0, shape=shape)62 weight = 0.0163 loss = losses.l1_regularizer(weight)(tensor)64 self.assertEquals(loss.op.name, 'L1Regularizer/value')65 self.assertAlmostEqual(loss.eval(), num_elem * weight, 5)66 def testL2Regularizer(self):67 with self.test_session():68 shape = [5, 5, 5]69 num_elem = 5 * 5 * 570 tensor = tf.constant(1.0, shape=shape)71 loss = losses.l2_regularizer()(tensor)72 self.assertEquals(loss.op.name, 'L2Regularizer/value')73 self.assertAlmostEqual(loss.eval(), num_elem / 2, 5)74 def testL2RegularizerWithScope(self):75 with self.test_session():76 shape = [5, 5, 5]77 num_elem = 5 * 5 * 578 tensor = tf.constant(1.0, shape=shape)79 loss = losses.l2_regularizer(scope='L2')(tensor)80 self.assertEquals(loss.op.name, 'L2/value')81 self.assertAlmostEqual(loss.eval(), num_elem / 2, 5)82 def testL2RegularizerWithWeight(self):83 with self.test_session():84 shape = [5, 5, 5]85 num_elem = 5 * 5 * 586 tensor = tf.constant(1.0, shape=shape)87 weight = 0.0188 loss = losses.l2_regularizer(weight)(tensor)89 self.assertEquals(loss.op.name, 'L2Regularizer/value')90 self.assertAlmostEqual(loss.eval(), num_elem * weight / 2, 5)91 def testL1L2Regularizer(self):92 with self.test_session():93 shape = [5, 5, 5]94 num_elem = 5 * 5 * 595 tensor = tf.constant(1.0, shape=shape)96 loss = losses.l1_l2_regularizer()(tensor)97 self.assertEquals(loss.op.name, 'L1L2Regularizer/value')98 self.assertAlmostEqual(loss.eval(), num_elem + num_elem / 2, 5)99 def testL1L2RegularizerWithScope(self):100 with self.test_session():101 shape = [5, 5, 5]102 num_elem = 5 * 5 * 5103 tensor = tf.constant(1.0, shape=shape)104 loss = losses.l1_l2_regularizer(scope='L1L2')(tensor)105 self.assertEquals(loss.op.name, 'L1L2/value')106 self.assertAlmostEqual(loss.eval(), num_elem + num_elem / 2, 5)107 def testL1L2RegularizerWithWeights(self):108 with self.test_session():109 shape = [5, 5, 5]110 num_elem = 5 * 5 * 5111 tensor = tf.constant(1.0, shape=shape)112 weight_l1 = 0.01113 weight_l2 = 0.05114 loss = losses.l1_l2_regularizer(weight_l1, weight_l2)(tensor)115 self.assertEquals(loss.op.name, 'L1L2Regularizer/value')116 self.assertAlmostEqual(117 loss.eval(),118 num_elem *119 weight_l1 +120 num_elem *121 weight_l2 /122 2,123 5)124class CrossEntropyLossTest(tf.test.TestCase):125 def testCrossEntropyLossAllCorrect(self):126 with self.test_session():127 logits = tf.constant([[10.0, 0.0, 0.0],128 [0.0, 10.0, 0.0],129 [0.0, 0.0, 10.0]])130 labels = tf.constant([[1, 0, 0],131 [0, 1, 0],132 [0, 0, 1]])133 loss = losses.cross_entropy_loss(logits, labels)134 self.assertEquals(loss.op.name, 'CrossEntropyLoss/value')135 self.assertAlmostEqual(loss.eval(), 0.0, 3)136 def testCrossEntropyLossAllWrong(self):137 with self.test_session():138 logits = tf.constant([[10.0, 0.0, 0.0],139 [0.0, 10.0, 0.0],140 [0.0, 0.0, 10.0]])141 labels = tf.constant([[0, 0, 1],142 [1, 0, 0],143 [0, 1, 0]])144 loss = losses.cross_entropy_loss(logits, labels)145 self.assertEquals(loss.op.name, 'CrossEntropyLoss/value')146 self.assertAlmostEqual(loss.eval(), 10.0, 3)147 def testCrossEntropyLossAllWrongWithWeight(self):148 with self.test_session():149 logits = tf.constant([[10.0, 0.0, 0.0],150 [0.0, 10.0, 0.0],151 [0.0, 0.0, 10.0]])152 labels = tf.constant([[0, 0, 1],153 [1, 0, 0],154 [0, 1, 0]])155 loss = losses.cross_entropy_loss(logits, labels, weight=0.5)156 self.assertEquals(loss.op.name, 'CrossEntropyLoss/value')157 self.assertAlmostEqual(loss.eval(), 5.0, 3)158if __name__ == '__main__':...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Airtest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful