A trainable parameter p initialized to 0.5:
p
class Model(nn.Module): def __init__(self): super(Model, self).__init__() self.p = nn