fe8d55ae1870b6c7c3725f7ac7cc6b1d1ac0d39e,tensorforce/models/q_model.py,QModel,tf_q_delta,#QModel#Any#Any#Any#Any#,59
Before Change
delta = reward + next_q_value - q_value // tf.stop_gradient(q_target)
collapsed_size = util.prod(util.shape(delta)[1:])
return tf.reshape(tensor=delta, shape=(-1, collapsed_size))
def tf_loss_per_instance(self, states, internals, actions, terminal, reward):
embedding = self.network.apply(
x={name: state[:-1] for name, state in states.items()},
After Change
:return: A list of deltas per action
for _ in range(util.rank(q_value) - 1):
terminal = tf.expand_dims(input=terminal, axis=1)
reward = tf.expand_dims(input=reward, axis=1)
multiples = (1,) + util.shape(q_value)[1:]
terminal = tf.tile(input=terminal, multiples=multiples)
reward = tf.tile(input=reward, multiples=multiples)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: reinforceio/tensorforce
Commit Name: fe8d55ae1870b6c7c3725f7ac7cc6b1d1ac0d39e
Time: 2017-10-26
Author: aok25@cl.cam.ac.uk
File Name: tensorforce/models/q_model.py
Class Name: QModel
Method Name: tf_q_delta
Project Name: GPflow/GPflow
Commit Name: 5a945d67b37120610880c3323224a4e86404ae1d
Time: 2020-08-27
Author: dutordoirv@gmail.com
File Name: gpflow/mean_functions.py
Class Name: Constant
Method Name: __call__
Project Name: GPflow/GPflow
Commit Name: f3c511060ce62072a34a50319237d28b82d10448
Time: 2020-08-27
Author: dutordoirv@gmail.com
File Name: gpflow/mean_functions.py
Class Name: Constant
Method Name: __call__