tf_agents.bandits.policies.greedy_multi_objective_neural_policy.scalarize_objectives
Scalarize a rank-3 objectives tensor into a rank-2 tensor.
@tf.function
tf_agents.bandits.policies.greedy_multi_objective_neural_policy.scalarize_objectives(
objectives_tensor: tf.Tensor,
scalarizer: tf_agents.bandits.multi_objective.multi_objective_scalarizer.Scalarizer
)
Scalarize an objective values tensor shaped as
[batch_size, num_of_objectives, num_of_actions] along the second dimension
into a rank-2 tensor shaped as [batch_size, num_of_actions]
Returns |
A rank-2 tensor of scalarized rewards shaped as
[batch_size, num_of_actions].
|
Raises |
ValueError
|
If objectives_tensor is not rank-3.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[null,null,["Last updated 2024-04-26 UTC."],[],[]]