test package¶
Submodules¶
test.test_losses module¶
Documentation
-
class
test.test_losses.TestLambdaWeights(methodName='runTest')[source]¶ Bases:
unittest.case.TestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
-
class
test.test_losses.TestLosses(methodName='runTest')[source]¶ Bases:
unittest.case.TestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
-
exp_softmax= [[0.69638747, 0.01275478, 0.25618663, 0.03467109, 0.0, 0.0], [0.01936247, 0.05263266, 0.14307041, 0.00712306, 0.3889057, 0.3889057], [0.01798621, 0.98201376, 0.0, 0.0, 0.0, 0.0], [0.01786798, 0.00657326, 0.9755587, 0.0, 0.0, 0.0], [0.33333334, 0.33333334, 0.33333334, 0.0, 0.0, 0.0]]¶
-
y_pred= <tf.RaggedTensor [[3.5, 2.200000047683716, 0.5, 1.0], [1.7000000476837158, 2.299999952316284, 2.0999999046325684, 1.100000023841858, 0.10000000149011612, 1.0], [3.799999952316284, 0.800000011920929], [1.5, -1.0, 1.0], [0.10000000149011612, 1.0, 0.30000001192092896]]>¶
-
y_true= <tf.RaggedTensor [[4.0, 0.0, 3.0, 1.0], [1.0, 2.0, 3.0, 0.0, 4.0, 4.0], [0.0, 4.0], [-1.0, -2.0, 3.0], [0.0, 0.0, 0.0]]>¶
-
test.test_metrics module¶
Documentation
-
class
test.test_metrics.TestMetrics(methodName='runTest')[source]¶ Bases:
tensorflow.python.framework.test_util.TensorFlowTestCaseTest cases for metrics. Test names that are prefixed with tfr are a subset of the test cases from the tensorflow ranking project to verify that the results are the same. However, these tests are not particularly robust and do not test padded queries, so additional tests are also included.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
-
exp_rank= array([[0, 1, 3, 2, 4, 5], [1, 2, 0, 3, 5, 4], [0, 1, 2, 3, 4, 5], [0, 2, 1, 3, 4, 5], [1, 2, 0, 3, 4, 5]])¶
-
y_pred= <tf.RaggedTensor [[3.5, 2.200000047683716, 0.5, 1.0], [1.7000000476837158, 2.299999952316284, 2.0999999046325684, 1.100000023841858, 0.10000000149011612, 1.0], [3.799999952316284, 0.800000011920929], [1.5, -1.0, 1.0], [0.10000000149011612, 1.0, 0.30000001192092896]]>¶
-
y_pred_dense= <tf.Tensor: shape=(5, 6), dtype=float32, numpy= array([[ 3.5000000e+00, 2.2000000e+00, 5.0000000e-01, 1.0000000e+00, -3.4028235e+38, -3.4028235e+38], [ 1.7000000e+00, 2.3000000e+00, 2.0999999e+00, 1.1000000e+00, 1.0000000e-01, 1.0000000e+00], [ 3.8000000e+00, 8.0000001e-01, -3.4028235e+38, -3.4028235e+38, -3.4028235e+38, -3.4028235e+38], [ 1.5000000e+00, -1.0000000e+00, 1.0000000e+00, -3.4028235e+38, -3.4028235e+38, -3.4028235e+38], [ 1.0000000e-01, 1.0000000e+00, 3.0000001e-01, -3.4028235e+38, -3.4028235e+38, -3.4028235e+38]], dtype=float32)>¶
-
y_true= <tf.RaggedTensor [[4, 0, 3, 1], [1, 2, 3, 0, 4, 4], [0, 4], [-1, -2, 3], [0, 0, 0]]>¶
-
test.test_preprocessing module¶
Documentation
-
class
test.test_preprocessing.TestPreprocessing(methodName='runTest')[source]¶ Bases:
unittest.case.TestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
-
x= array([[ 2., 0., 0., 9., 8., 2., -1., 1.], [ 2., 2., 7., 8., 7., 0., 4., -2.], [ 5., 0., 6., 3., 8., 7., 8., 7.], [ 2., -1., 7., 3., 1., 6., 4., 5.], [ 1., 7., 8., 2., 1., 1., 3., 7.]], dtype=float32)¶
-
Module contents¶
Documentation