Skip to content

torch.nn.functional.Dropout() doesn't have the training argument. #686

@kaiidams

Description

@kaiidams

PyTorch has these in https://pytorch.org/docs/stable/nn.functional.html#dropout-functions

  • torch.nn.functional.dropout(input, p=0.5, training=True, inplace=False)
  • torch.nn.functional.alpha_dropout(input, p=0.5, training=False, inplace=False)
  • torch.nn.functional.feature_alpha_dropout(input, p=0.5, training=False, inplace=False)
  • torch.nn.functional.dropout1d(input, p=0.5, training=True, inplace=False)
  • torch.nn.functional.dropout2d(input, p=0.5, training=True, inplace=False)
  • torch.nn.functional.dropout3d(input, p=0.5, training=True, inplace=False)

TorchSharp has these

  • static public Tensor Dropout(Tensor x, double probability = 0.5, bool inPlace = false)
  • static public Tensor alpha_dropout(Tensor x, double probability = 0.5, bool inPlace = false)
  • static public Tensor feature_alpha_dropout(Tensor x, double p = 0.5)
  • static public Tensor dropout2d(Tensor x, double probability = 0.5, bool inPlace = false)
  • static public Tensor Dropout3d(Tensor x, double probability = 0.5, bool inPlace = false)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions