giagrad.Tensor.dirac#
- Tensor.dirac(groups=1) Tensor [source]#
Fills the {3, 4, 5}-dimensional Tensor data with the Dirac delta function.
Preserves the identity of the inputs in Convolutional layers, where as many input channels are preserved as possible. In case of groups > 1, each group of channels preserves identity.
- Parameters:
groups¶ (int, default: 1) – Number of groups in the conv layer.
Examples
>>> Tensor.empty(3, 24, 5, 5).dirac(3)