besskge.embedding.init_xavier_norm

besskge.embedding.init_xavier_norm(embedding_table, gain=1.0)[source]

Initialize embeddings according to Xavier normal scheme, with fan_in = 0, fan_out=row_size.

Parameters:
  • embedding_table (Tensor) – Tensor of embedding parameters to initialize.

  • gain (float) – Scaling factor for standard deviation. Default: 1.0.

Return type:

Tensor

Returns:

Initialized tensor.