input = Variable(...)

p = some_net(input)
x = some_other_net(input)

out = F.dropout(x, p.data[0])

out.backward()

In the above example, no gradient will flow back in some_net so you won’t be able to train it.
Even if the interface was taking a Variable as input for p, it would not work because the expression d(out)/d(p) does not exists and so no gradient can be computed for this input.