dlpy.layers.EmbeddingLoss

class dlpy.layers.EmbeddingLoss(name=None, margin=2, src_layers=None, **kwargs)

Bases: dlpy.layers.Layer

EmbeddingLoss layer

Parameters:
name : string, optional

Specifies the name of the layer.

margin : double, optional

Specifies the margin value that defines a radius for dissimilar pair contributions.
Default: 2

src_layers : iter-of-Layers, optional

Specifies the layers directed to this layer.

Returns:
EmbeddingLoss
__init__(name=None, margin=2, src_layers=None, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([name, margin, src_layers]) Initialize self.
count_instances()
format_name([block_num, local_count]) Format the name of the layer
get_number_of_instances()
to_model_params() Convert the model configuration to CAS action parameters