torch.nn.utils.prune.custom_from_mask — PyTorch 1.10.1 ...
pytorch.org › docs › stabletorch.nn.utils.prune.custom_from_mask(module, name, mask) [source] Prunes tensor corresponding to parameter called name in module by applying the pre-computed mask in mask . Modifies module in place (and also return the modified module) by: 1) adding a named buffer called name+'_mask' corresponding to the binary mask applied to the parameter ...
torch.Tensor.masked_fill — PyTorch 1.10.1 documentation
pytorch.org › docs › stableLearn about PyTorch’s features and capabilities. Community. Join the PyTorch developer community to contribute, learn, and get your questions answered. Developer Resources. Find resources and get questions answered. Forums. A place to discuss PyTorch code, issues, install, research. Models (Beta) Discover, publish, and reuse pre-trained models
torch.masked_select — PyTorch 1.10.1 documentation
pytorch.org › docs › stabletorch.masked_select. Returns a new 1-D tensor which indexes the input tensor according to the boolean mask mask which is a BoolTensor. The shapes of the mask tensor and the input tensor don’t need to match, but they must be broadcastable. input ( Tensor) – the input tensor. out ( Tensor, optional) – the output tensor.