allenact.embodiedai.mapping.mapping_losses
#
BinnedPointCloudMapLoss
#
class BinnedPointCloudMapLoss(AbstractActorCriticLoss)
A (binary cross entropy) loss for training metric maps for free space prediction.
BinnedPointCloudMapLoss.__init__
#
| __init__(binned_pc_uuid: str, map_logits_uuid: str)
Initializer.
Parameters
- binned_pc_uuid : The uuid of a sensor returning
a dictionary with an "egocentric_update"
key with the same format as returned by
allenact.embodied_ai.mapping_utils.map_builders.BinnedPointCloudMapBuilder
. Such a sensor - can be found in the
allenact_plugins
library: seeallenact_plugins.ithor_plugin.ithor_sensors.BinnedPointCloudMapTHORSensor
. - map_logits_uuid : key used to index into
actor_critic_output.extras
(returned by the model) whose value should be a tensor of the same shape as the tensor corresponding to the above "egocentric_update" key.
SemanticMapFocalLoss
#
class SemanticMapFocalLoss(AbstractActorCriticLoss)
A (focal-loss based) loss for training metric maps for free space prediction.
As semantic maps tend to be quite sparse this loss uses the focal
loss (https://arxiv.org/abs/1708.02002) rather than binary cross
entropy (BCE). If the gamma
parameter is 0.0 then this is just the
normal BCE, larger values of gamma
result less and less emphasis
being paid to examples that are already well classified.
SemanticMapFocalLoss.__init__
#
| __init__(semantic_map_uuid: str, map_logits_uuid: str, gamma: float = 2.0)
Initializer.
Parameters
- semantic_map_uuid : The uuid of a sensor returning
a dictionary with an "egocentric_update"
key with the same format as returned by
allenact.embodied_ai.mapping_utils.map_builders.SemanticMapBuilder
. Such a sensor - can be found in the
allenact_plugins
library: seeallenact_plugins.ithor_plugin.ithor_sensors.SemanticMapTHORSensor
. - map_logits_uuid : key used to index into
actor_critic_output.extras
(returned by the model) whose value should be a tensor of the same shape as the tensor corresponding to the above "egocentric_update" key.