-
-
Save SzateX/d5ad41bbc355347342efc345b447b942 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x_data = tf.placeholder(shape=[None, 4], dtype=tf.float32) | |
y_target = tf.placeholder(shape=[None, 1], dtype=tf.float32) | |
A2 = tf.Variable(tf.random_normal(shape=[first_layer_nodes, 1])) # first_layer nodes -> sum node | |
c = tf.Variable(tf.random_uniform([first_layer_nodes, 4], dtype=tf.float32)) # centroids | |
exp_list = [] | |
for i in range(first_layer_nodes): | |
euclid_distance = tf.reduce_sum(tf.square(tf.subtract(x_data, c[i, :])), 1) | |
exp_list.append(tf.exp(-SC * euclid_distance)) | |
phi = tf.transpose(tf.stack(exp_list)) | |
final_output = tf.matmul(phi, A2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment