aa3c6a5f79d82044306f3a11f1de6b7231163d90,tf_agents/agents/behavioral_cloning/behavioral_cloning_agent.py,BehavioralCloningAgent,_loss,#BehavioralCloningAgent#Any#Any#,226
Before Change
// 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)
if self._summarize_grads_and_vars:
with tf.name_scope("Variables/"):
for var in self._cloning_network.trainable_weights:
tf.compat.v2.summary.histogram(
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}
common.summarize_scalar_dict(dict_losses,
step=self.train_step_counter,
name_scope="Losses/")
if self._summarize_grads_and_vars:
with tf.name_scope("Variables/"):
for var in self._cloning_network.trainable_weights:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 17
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: aa3c6a5f79d82044306f3a11f1de6b7231163d90
Time: 2020-02-24
Author: sguada@google.com
File Name: tf_agents/agents/categorical_dqn/categorical_dqn_agent.py
Class Name: CategoricalDqnAgent
Method Name: _loss
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: aa3c6a5f79d82044306f3a11f1de6b7231163d90
Time: 2020-02-24
Author: sguada@google.com
File Name: tf_agents/agents/dqn/dqn_agent.py
Class Name: DqnAgent
Method Name: _loss