MCPcopy
hub / github.com/Audio-AGI/AudioSep / __init__

Method __init__

models/CLAP/open_clip/pann_model.py:127–150  ·  view source on GitHub ↗
(self, n_in, n_out, activation="linear", temperature=1.0)

Source from the content-addressed store, hash-verified

125
126class AttBlock(nn.Module):
127 def __init__(self, n_in, n_out, activation="linear", temperature=1.0):
128 super(AttBlock, self).__init__()
129
130 self.activation = activation
131 self.temperature = temperature
132 self.att = nn.Conv1d(
133 in_channels=n_in,
134 out_channels=n_out,
135 kernel_size=1,
136 stride=1,
137 padding=0,
138 bias=True,
139 )
140 self.cla = nn.Conv1d(
141 in_channels=n_in,
142 out_channels=n_out,
143 kernel_size=1,
144 stride=1,
145 padding=0,
146 bias=True,
147 )
148
149 self.bn_att = nn.BatchNorm1d(n_out)
150 self.init_weights()
151
152 def init_weights(self):
153 init_layer(self.att)

Callers

nothing calls this directly

Calls 2

init_weightsMethod · 0.95
__init__Method · 0.45

Tested by

no test coverage detected