@timed
def update(self, mini_batch, num_sequences):
    '\n        Performs update on model.\n        :param mini_batch: Batch of experiences.\n        :param num_sequences: Number of sequences to process.\n        :return: Results of update.\n        '
    feed_dict = self.construct_feed_dict(self.model, mini_batch, num_sequences)
    stats_needed = self.stats_name_to_update_name
    update_stats = {}
    for (_, reward_signal) in self.reward_signals.items():
        feed_dict.update(reward_signal.prepare_update(self.model, mini_batch, num_sequences))
        stats_needed.update(reward_signal.stats_name_to_update_name)
    update_vals = self._execute_model(feed_dict, self.update_dict)
    for (stat_name, update_name) in stats_needed.items():
        update_stats[stat_name] = update_vals[update_name]
    return update_stats
Performs update on model.
:param mini_batch: Batch of experiences.
:param num_sequences: Number of sequences to process.
:return: Results of update.
@timed
def update(self, mini_batch, num_sequences):
    '\n        Performs update on model.\n        :param mini_batch: Batch of experiences.\n        :param num_sequences: Number of sequences to process.\n        :return: Results of update.\n        '
    feed_dict = self.construct_feed_dict(self.model, mini_batch, num_sequences)
    stats_needed = self.stats_name_to_update_name
    update_stats = {}
    for (_, reward_signal) in self.reward_signals.items():
        feed_dict.update(reward_signal.prepare_update(self.model, mini_batch, num_sequences))
        stats_needed.update(reward_signal.stats_name_to_update_name)
    update_vals = self._execute_model(feed_dict, self.update_dict)
    for (stat_name, update_name) in stats_needed.items():
        update_stats[stat_name] = update_vals[update_name]
    return update_stats