If condition evaluates to false, print the list of tensors in data.
summarize determines how many entries of the tensors to print.
# Ensure maximum element of x is smaller or equal to 1assert_op=tf.Assert(tf.less_equal(tf.reduce_max(x),1.),[x])withtf.control_dependencies([assert_op]):...codeusingx...
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2020-10-01 UTC."],[],[],null,["# tf.debugging.Assert\n\n\u003cbr /\u003e\n\n|-----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|\n| [TensorFlow 1 version](/versions/r1.15/api_docs/python/tf/debugging/Assert) | [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.2.0/tensorflow/python/ops/control_flow_ops.py#L112-L176) |\n\nAsserts that the given condition is true.\n\n#### View aliases\n\n\n**Main aliases**\n\n[`tf.Assert`](/api_docs/python/tf/debugging/Assert)\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.Assert`](/api_docs/python/tf/debugging/Assert), [`tf.compat.v1.debugging.Assert`](/api_docs/python/tf/debugging/Assert)\n\n\u003cbr /\u003e\n\n tf.debugging.Assert(\n condition, data, summarize=None, name=None\n )\n\nIf `condition` evaluates to false, print the list of tensors in `data`.\n`summarize` determines how many entries of the tensors to print.\n**Note:** In graph mode, to ensure that Assert executes, one usually attaches a dependency: \n\n # Ensure maximum element of x is smaller or equal to 1\n assert_op = tf.Assert(tf.less_equal(tf.reduce_max(x), 1.), [x])\n with tf.control_dependencies([assert_op]):\n ... code using x ...\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-------------|---------------------------------------------------|\n| `condition` | The condition to evaluate. |\n| `data` | The tensors to print out when condition is false. |\n| `summarize` | Print this many entries of each tensor. |\n| `name` | A name for this operation (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------|\n| `assert_op` | An `Operation` that, when executed, raises a [`tf.errors.InvalidArgumentError`](../../tf/errors/InvalidArgumentError) if `condition` is not true. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|---|---|\n\n\u003cbr /\u003e\n\n| **Note:** The output of this function should be used. If it is not, a warning will be logged or an error may be raised. To mark the output as used, call its .mark_used() method.\n\n#### Eager Compatibility\n\n[`tf.errors.InvalidArgumentError`](../../tf/errors/InvalidArgumentError) if `condition` is not true"]]