By using pyTorch there is two ways to dropout
torch.nn.Dropout and torch.nn.functional.Dropout.
I struggle to see the difference between t
Check torch.nn.functional's implementation:
if p < 0. or p > 1.:
raise ValueError("dropout probability has to be between 0 and 1, "
"but got {}".format(p))
return (_VF.dropout_(input, p, training)
if inplace
else _VF.dropout(input, p, training))
Check: torch.nn.dropout's implementation:
def forward(self, input):
return F.dropout(input, self.p, self.training, self.inplace)
So: their internal operation is the same. Interfaces are different. As for _VF, I guess that's some C/C++ code.