mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
11 lines
207 B
Python
11 lines
207 B
Python
import tensorflow as tf
|
|
|
|
W = tf.Variable(tf.ones(shape=(2,2)), name="W")
|
|
b = tf.Variable(tf.zeros(shape=(2)), name="b")
|
|
|
|
@tf.function
|
|
def forward(x):
|
|
return W * x + b
|
|
|
|
out_a = forward([1,0])
|
|
print(out_a) |