コード例 #1
0
ファイル: ragged_print_op_test.py プロジェクト: MFChunga/poo
 def testRaggedToString(self,
                        rt,
                        expected,
                        summarize=None,
                        ragged_rank=None):
     rt = ragged_factory_ops.constant(rt, ragged_rank=ragged_rank)
     actual = ragged_string_ops.ragged_tensor_to_string(rt,
                                                        summarize=summarize)
     self.assertAllEqual(actual, expected)
コード例 #2
0
 def testRaggedToStringErrors(self,
                              rt,
                              error,
                              summarize=None,
                              exception=ValueError):
   rt = ragged_factory_ops.constant(rt)
   with self.assertRaisesRegex(exception, error):
     self.evaluate(
         ragged_string_ops.ragged_tensor_to_string(rt, summarize=summarize))
コード例 #3
0
ファイル: ragged_print_op_test.py プロジェクト: MFChunga/poo
 def f(rt):
     return ragged_string_ops.ragged_tensor_to_string(rt)