NodeFlow.set_e_initializer(initializer, block_id='__ALL__', field=None)[source]

Set the initializer for empty edge features.

Initializer is a callable that returns a tensor given the shape, data type and device context.

When a subset of the edges are assigned a new feature, initializer is used to create feature for rest of the edges.

  • initializer (callable) – The initializer.

  • block_id (int) – the block to set the initializer.

  • field (str, optional) – The feature field name. Default is set an initializer for all the feature fields.