|
|
|
|
|
|
:param encoded_state: Tensor corresponding to encoded current state. |
|
|
|
:param encoded_next_state: Tensor corresponding to encoded next state. |
|
|
|
""" |
|
|
|
if not self.transfer: |
|
|
|
encoded_state = tf.stop_gradient(encoded_state) |
|
|
|
|
|
|
|
#if not self.transfer: |
|
|
|
# hidden = tf.stop_gradient(hidden) |
|
|
|
|
|
|
|
|
|
|
|
for i in range(forward_layers): |
|
|
|
hidden = tf.layers.dense( |
|
|
|
hidden, |
|
|
|
|
|
|
forward_layers: int, |
|
|
|
separate_train: bool = False, |
|
|
|
): |
|
|
|
if not self.transfer: |
|
|
|
encoded_state = tf.stop_gradient(encoded_state) |
|
|
|
|
|
|
|
#if not self.transfer: |
|
|
|
# hidden = tf.stop_gradient(hidden) |
|
|
|
|
|
|
|