|
|
|
|
|
|
) |
|
|
|
self.optimizer.zero_grad() |
|
|
|
loss.backward() |
|
|
|
# for grad,weight in zip(grads, self.model.trainable_weights): |
|
|
|
# if "critic/" in weight.name: |
|
|
|
# print(grad,weight.name) |
|
|
|
|
|
|
|
# for stat_name, update_name in stats_needed.items(): |
|
|
|
# update_stats[stat_name] = update_vals[update_name] |
|
|
|
|
|
|
|
return update_stats |
|
|
|
|
|
|
|
def get_value_estimates( |
|
|
|