I am new to tensorflow and I am learning it using a book called Deep Learning with Applications Using Python Chatbots and Face, Object,and Speech Recognition With TensorFlow and Keras.
On Chapter 1 page 6, there are lines of code:
And I typed the codes showed in the book exactly,
# Tensorboard can be used. It is optionalmy_
# Output graph can be seen on tensorboard
import os
merged = tf.summary.merge_all(key='summaries')
if not os.path.exists('tensorboard_logs/'):
os.makedirs('tenosrboard_logs/')
my_writer = tf.summary.FileWriter('/home/manaswi/tenosrboard_logs/', sess.graph)
def TB(cleanup=False):
import webbrowser
webbrowser.open('http://127.0.1.1:6006')
!tensorboard --logdir='/home/manaswi/tenosrboard_logs'
if cleanup:
!rm -R tensorboard_logs/
TB(1) # Launch graph on tensorboard on your browser
But I get a syntax error when I run this code.
File "c1_demo.py", line 26
!tensorboard --logdir='/home/manaswi/tenosrboard_logs'
^
SyntaxError: invalid syntax
Am I doing something wrong or is the code problem.
