basic block (no BN)
| 123 | |
| 124 | |
| 125 | class SameBlock1d(nn.Module): |
| 126 | """ |
| 127 | basic block (no BN) |
| 128 | """ |
| 129 | |
| 130 | def __init__(self, in_features, out_features, kernel_size, padding): |
| 131 | super(SameBlock1d, self).__init__() |
| 132 | self.conv = nn.Conv1d( |
| 133 | in_channels=in_features, |
| 134 | out_channels=out_features, |
| 135 | kernel_size=kernel_size, |
| 136 | padding=padding, |
| 137 | ) |
| 138 | self.relu = nn.ReLU() |
| 139 | |
| 140 | def forward(self, x): |
| 141 | out = self.conv(x) |
| 142 | out = self.relu(out) |
| 143 | return out |
| 144 | |
| 145 | |
| 146 | class SameBlock2d(nn.Module): |