MCPcopy Create free account
hub / github.com/OUCMachineLearning/OUCML / drop_path

Function drop_path

AutoML/darts-master/cnn/utils.py:102–108  ·  view source on GitHub ↗
(x, drop_prob)

Source from the content-addressed store, hash-verified

100
101
102def drop_path(x, drop_prob):
103 if drop_prob > 0.:
104 keep_prob = 1.-drop_prob
105 mask = Variable(torch.cuda.FloatTensor(x.size(0), 1, 1, 1).bernoulli_(keep_prob))
106 x.div_(keep_prob)
107 x.mul_(mask)
108 return x
109
110
111def create_exp_dir(path, scripts_to_save=None):

Callers 1

forwardMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected