Java is a registered trademark of Oracle and/or its affiliates. For details, see the Google Developers Site Policies. Tf.summary.text("markdown_jubiliee", markdown_text, step=0)Įxcept as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. Tf.summary.text("run_params", pretty_json(some_obj_worth_noting), step=0) TensorBoard supports basic markdown syntax, including: Return "".join("\t" + line for line in json_hp.splitlines(True)) # which supports fenced codeblocks in Markdown. # TODO: Update this example when TensorBoard is released with Logdir = "logs/markdown/" + datetime.now().strftime("%Y%m%d-%H%M%S") (If you don't want Markdown interpretation, see this issue for workarounds to suppress interpretation.) # Sets up a third timestamped log directory under "logs" TensorBoard interprets text summaries as Markdown, since rich formatting can make the data you log easier to read and understand, as shown below. %tensorboard -logdir logs/multiple_texts -samples_per_plugin 'text=5' Tf.summary.text("just_from_step_0", "This is an important announcement from step 0", step=0) Tf.summary.text("a_stream_of_text", f"Hello from step ", step=step) Logdir = "logs/multiple_texts/" + datetime.now().strftime("%Y%m%d-%H%M%S") # Sets up a second directory to not overwrite the first one. You can control the sampling rate using the -samples_per_plugin flag. Note that if you log text at many steps, TensorBoard will subsample the steps to display so as to make the presentation manageable. If you have multiple streams of text, you can keep them in separate namespaces to help organize them, just like scalars or other data. Wait a few seconds for the UI to spin up. You can also log diagnostic data as text that can be helpful in the course of your model development. This can be extremely helpful to sample and examine your input data, or to record execution metadata or generated text. Now, use TensorBoard to examine the text. Overview Using the TensorFlow Text Summary API, you can easily log arbitrary text and view it in TensorBoard. Tf.summary.text("first_text", my_text, step=0) # Creates a file writer for the log directory.įile_writer = tf.summary.create_file_writer(logdir) Logdir = "logs/text_basics/" + datetime.now().strftime("%Y%m%d-%H%M%S") To understand how the Text Summary API works, you're going to simply log a bit of text and see how it is presented in TensorBoard. "This notebook requires TensorFlow 2.0 or above." Print("TensorFlow version: ", tf._version_)Īssert version.parse(tf._version_).release >= 2, \ # Load the TensorBoard notebook extension. # %tensorflow_version only exists in Colab. In this tutorial, you will try out some basic use cases of the Text Summary API. Using the TensorFlow Text Summary API, you can easily log arbitrary text and view it in TensorBoard.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |