Skip to content

Commit 0a23183

Browse files
committed
edit dtype = float32
1 parent 339e8d4 commit 0a23183

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tensorflowTUT/tf11_build_network/full_code.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ def add_layer(inputs, in_size, out_size, activation_function=None):
2222
return outputs
2323

2424
# Make up some real data
25-
x_data = np.linspace(-1, 1, 300)[:, np.newaxis]
26-
noise = np.random.normal(0, 0.05, x_data.shape)
25+
x_data = np.linspace(-1, 1, 300, dtype=np.float32)[:, np.newaxis]
26+
noise = np.random.normal(0, 0.05, x_data.shape).astype(np.float32)
2727
y_data = np.square(x_data) - 0.5 + noise
2828

2929
##plt.scatter(x_data, y_data)

0 commit comments

Comments
 (0)