MCPcopy Create free account
hub / github.com/CausalLearning/robust-unlearnable-examples / __init__

Method __init__

models/densenet.py:100–118  ·  view source on GitHub ↗
(
        self,
        num_layers: int,
        num_input_features: int,
        bn_size: int,
        growth_rate: int,
        drop_rate: float,
        memory_efficient: bool = False
    )

Source from the content-addressed store, hash-verified

98 _version = 2
99
100 def __init__(
101 self,
102 num_layers: int,
103 num_input_features: int,
104 bn_size: int,
105 growth_rate: int,
106 drop_rate: float,
107 memory_efficient: bool = False
108 ) -> None:
109 super(_DenseBlock, self).__init__()
110 for i in range(num_layers):
111 layer = _DenseLayer(
112 num_input_features + i * growth_rate,
113 growth_rate=growth_rate,
114 bn_size=bn_size,
115 drop_rate=drop_rate,
116 memory_efficient=memory_efficient,
117 )
118 self.add_module('denselayer%d' % (i + 1), layer)
119
120 def forward(self, init_features: Tensor) -> Tensor:
121 features = [init_features]

Callers

nothing calls this directly

Calls 2

_DenseLayerClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected