MCPcopy Create free account
hub / github.com/QWTforGithub/T2LDM / __init__

Method __init__

timm/models/layers/drop.py:112–127  ·  view source on GitHub ↗
(self,
                 drop_prob=0.1,
                 block_size=7,
                 gamma_scale=1.0,
                 with_noise=False,
                 inplace=False,
                 batchwise=False,
                 fast=True)

Source from the content-addressed store, hash-verified

110 """ DropBlock. See https://arxiv.org/pdf/1810.12890.pdf
111 """
112 def __init__(self,
113 drop_prob=0.1,
114 block_size=7,
115 gamma_scale=1.0,
116 with_noise=False,
117 inplace=False,
118 batchwise=False,
119 fast=True):
120 super(DropBlock2d, self).__init__()
121 self.drop_prob = drop_prob
122 self.gamma_scale = gamma_scale
123 self.block_size = block_size
124 self.with_noise = with_noise
125 self.inplace = inplace
126 self.batchwise = batchwise
127 self.fast = fast # FIXME finish comparisons of fast vs not
128
129 def forward(self, x):
130 if not self.training or not self.drop_prob:

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected