Naked

class pfhedge.nn.Naked(out_features=1)[source]

Returns a tensor filled with the scalar value zero.

Parameters

out_features (int, default=1) – Size of each output sample.

Shape:
  • Input: \((N, *, H_{\text{in}})\) where \(*\) means any number of additional dimensions and \(H_{\text{in}}\) is the number of input features.

  • Output: \((N, *, H_{\text{out}})\) where all but the last dimension are the same shape as the input and \(H_{\text{out}}\) is the number of output features.

Examples

>>> import torch
>>> from pfhedge.nn import Naked
>>>
>>> m = Naked()
>>> input = torch.zeros((2, 3))
>>> m(input)
tensor([[0.],
        [0.]])