Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created November 25, 2018 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NMZivkovic/2b879705bcec19572d840204140f30c4 to your computer and use it in GitHub Desktop.
Save NMZivkovic/2b879705bcec19572d840204140f30c4 to your computer and use it in GitHub Desktop.
# Neural network
self._input_layer = tf.placeholder('float', [None, inout_dim])
self._hidden_layer = tf.nn.sigmoid(tf.add(tf.matmul(self._input_layer, hiddel_layer_weights), hiddel_layer_biases))
self._output_layer = tf.matmul(self._hidden_layer, output_layer_weights) + output_layer_biases
self._real_output = tf.placeholder('float', [None, inout_dim])
self._meansq = tf.reduce_mean(tf.square(self._output_layer - self._real_output))
self._optimizer = tf.train.AdagradOptimizer(learning_rate).minimize(self._meansq)
self._training = tf.global_variables_initializer()
self._session = tf.Session()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment