forked from instillai/TensorFlow-Course
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path0-welcome.py
More file actions
35 lines (24 loc) · 1022 Bytes
/
Copy path0-welcome.py
File metadata and controls
35 lines (24 loc) · 1022 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#####################################################
########## Welcome to TensorFlow World ##############
#####################################################
# The tutorials in this section is just a start for going into TensorFlow world.
# The TensorFlow flags are used for having a more user friendly environment.
from __future__ import print_function
import tensorflow as tf
import os
######################################
######### Necessary Flags ############
# ####################################
log_dir = os.path.dirname(os.path.abspath(__file__)) + '/logs'
################################################
################# handling errors!##############
################################################
# Defining some sentence!
welcome = tf.constant('Welcome to TensorFlow world!')
# Run the session
with tf.Session() as sess:
writer = tf.summary.FileWriter(os.path.expanduser(log_dir), sess.graph)
print("output: ", sess.run(welcome))
# Closing the writer.
writer.close()
sess.close()