yamle.quantization.models.specific.mcdropout module#

class yamle.quantization.models.specific.mcdropout.QuantisedDropout1d(*args, **kwargs)[source]#

Bases: Dropout1d

This is the dropout class but the probability is remebered in a nn.Parameter.

Parameters:
  • p (float) – The probability of an element to be zeroed.

  • inplace (bool) – If set to True, will do this operation in-place.

forward(x)[source]#

This method is used to perform a forward pass through the dropout layer.

Return type:

Tensor

training: bool#
class yamle.quantization.models.specific.mcdropout.QuantisedDropout2d(*args, **kwargs)[source]#

Bases: Dropout2d

This is the dropout class but the probability is remebered in a nn.Parameter.

Parameters:
  • p (float) – The probability of an element to be zeroed.

  • inplace (bool) – If set to True, will do this operation in-place.

forward(x)[source]#

This method is used to perform a forward pass through the dropout layer.

Return type:

Tensor

training: bool#
class yamle.quantization.models.specific.mcdropout.QuantisedDropout3d(*args, **kwargs)[source]#

Bases: Dropout3d

This is the dropout class but the probability is remebered in a nn.Parameter.

Parameters:
  • p (float) – The probability of an element to be zeroed.

  • inplace (bool) – If set to True, will do this operation in-place.

forward(x)[source]#

This method is used to perform a forward pass through the dropout layer.

Return type:

Tensor

training: bool#