This document is relevant for: Trn1, Trn2, Trn3

nki.language.dropout#

nki.language.dropout(x, rate, dtype=None)[source]#

Randomly zeroes some of the elements of the input tile given a probability rate.

Warning

This API is experimental and may change in future releases.

Parameters:
  • x – a tile.

  • rate – the probability of zeroing each element. Can be a scalar constant or a tile of shape (x.shape[0], 1) for per-partition drop probabilities.

  • dtype – (optional) data type to cast the output type to (see Supported Data Types for more information); if not specified, it will default to be the same as the data type of the input tile.

Returns:

a tile with randomly zeroed elements of x.

This document is relevant for: Trn1, Trn2, Trn3