[[["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.compat.v1.Print\n\n\u003cbr /\u003e\n\n|-----------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.1.0/tensorflow/python/ops/logging_ops.py#L65-L112) |\n\nPrints a list of tensors. (deprecated) \n\n tf.compat.v1.Print(\n input_, data, message=None, first_n=None, summarize=None, name=None\n )\n\n| **Warning:** THIS FUNCTION IS DEPRECATED. It will be removed after 2018-08-20. Instructions for updating: Use tf.print instead of tf.Print. Note that tf.print returns a no-output operator that directly prints the output. Outside of defuns or eager mode, this operator will not be executed unless it is directly specified in session.run or used as a control dependency for other operators. This is only a concern in graph mode. Below is an example of how to ensure tf.print executes in graph mode:\n\nThis is an identity op (behaves like [`tf.identity`](../../../tf/identity)) with the side effect\nof printing `data` when evaluating.\n| **Note:** This op prints to the standard error. It is not currently compatible with jupyter notebook (printing to the notebook *server's* output, not into the notebook).\n\nAdditionally, to use tf.print in python 2.7, users must make sure to import\nthe following:\n\n`from __future__ import print_function`\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-------------|------------------------------------------------------------------------------------------------------------------|\n| `input_` | A tensor passed through this op. |\n| `data` | A list of tensors to print out when op is evaluated. |\n| `message` | A string, prefix of the error message. |\n| `first_n` | Only log `first_n` number of times. Negative numbers log always; this is the default. |\n| `summarize` | Only print this many entries of each tensor. If None, then a maximum of 3 elements are printed per input tensor. |\n| `name` | A name for the operation (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A `Tensor`. Has the same type and contents as `input_`. \u003cbr /\u003e sess = tf.compat.v1.Session() with sess.as_default(): tensor = tf.range(10) print_op = tf.print(tensor) with tf.control_dependencies([print_op]): out = tf.add(tensor, tensor) sess.run(out) \u003cbr /\u003e ||\n\n\u003cbr /\u003e"]]