@DominicElm/

TensorFlow API

Python

No description

fork
loading
Files
  • main.py
  • tf_api.py
main.py
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
import tf_api as tf
import numpy as np

X = np.array([0.4])
w = np.array([[0.4, 0.1, 0.2]])
b = np.array([[0.4,0.1,0.2]]).T

print(X.shape, w.shape)
print(X.dot(w))

# # create default graph
# tf.Graph().as_default()

# # construct computational graph by creating some nodes
# a = tf.Constant(15)
# b = tf.Constant(5)
# prod = tf.multiply(a, b)
# sum = tf.add(a, b)
# res = tf.divide(prod, sum)

# # create a session object
# session = tf.Session()

# # run computational graph to compute the output for 'res'
# out = session.run(res)
# print(out)