resnet.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:dawn-bench-models 作者: stanford-futuredata 项目源码 文件源码
def forward(self, inputs):
        H = self.conv1(inputs)

        if not self.pre_act:
            H = self.bn1(H)
            H = F.relu(H)

        for section_index in range(self.num_sections):
            H = getattr(self, f'section_{section_index}')(H)

        if self.pre_act:
            H = self.bn1(H)
            H = F.relu(H)

        H = F.avg_pool2d(H, H.size()[2:])
        H = H.view(H.size(0), -1)
        outputs = self.fc(H)

        return outputs
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号