positive_gradient_matrix = tf.multiply(input_matrix, self._hidden_states) | |
negative_gradient_matrix = tf.multiply(self._visible_cdstates, self._hidden_cdstates) | |
new_weights = self._weights | |
new_weights.assign_add(tf.multiply(positive_gradient_matrix, self._leraning_rate)) | |
new_weights.assign_sub(tf.multiply(negative_gradient_matrix, self._leraning_rate)) | |
self._training = tf.assign(self._weights, new_weights) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment