aa3c6a5f79d82044306f3a11f1de6b7231163d90,tf_agents/agents/behavioral_cloning/behavioral_cloning_agent.py,BehavioralCloningAgent,_loss,#BehavioralCloningAgent#Any#Any#,226
Before Change
// is the actual number of non-zero weight would artificially increase
// their contribution in the loss. Think about what would happen as
// the number of boundary samples increases.
if weights is not None:
error *= weights
loss = tf.reduce_mean(input_tensor=error)
with tf.name_scope("Losses/"):
tf.compat.v2.summary.scalar(
name="loss", data=loss, step=self.train_step_counter)
After Change
// their contribution in the loss. Think about what would happen as
// the number of boundary samples increases.
agg_loss = common.aggregate_losses(
per_example_loss=error,
sample_weight=weights,
regularization_loss=self._cloning_network.losses)
total_loss = agg_loss.total_loss
dict_losses = {"loss": agg_loss.weighted,
"reg_loss": agg_loss.regularization,
"total_loss": total_loss}
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances Project Name: tensorflow/agents
Commit Name: aa3c6a5f79d82044306f3a11f1de6b7231163d90
Time: 2020-02-24
Author: sguada@google.com
File Name: tf_agents/agents/behavioral_cloning/behavioral_cloning_agent.py
Class Name: BehavioralCloningAgent
Method Name: _loss
Project Name: tensorflow/agents
Commit Name: c30223ec80213014c53a011aef4a1c5cc95b86d7
Time: 2020-03-30
Author: sguada@google.com
File Name: tf_agents/agents/sac/sac_agent.py
Class Name: SacAgent
Method Name: actor_loss
Project Name: tensorflow/agents
Commit Name: c30223ec80213014c53a011aef4a1c5cc95b86d7
Time: 2020-03-30
Author: sguada@google.com
File Name: tf_agents/agents/sac/sac_agent.py
Class Name: SacAgent
Method Name: critic_loss