INNER CODE UNIT · Python

forward

digantamisra98/Mish · PyTorch Benchmarks/resnet.py:31

    def forward(self, x):
        residual = x

        out = self.conv1(x)
        out = self.bn1(out)
        out = self.relu(out)

        out = self.conv2(out)
        out = self.bn2(out)

        if self.downsample is not None:
            residual = self.downsample(x)

        out += residual
        out = self.relu(out)
        return out

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…