model split
2020.07.30 08:15
https://forums.fast.ai/t/pytorch-best-way-to-get-at-intermediate-layers-in-vgg-and-resnet/5707/2
class ResNet50Bottom(nn.Module): def __init__(self, original_model): super(ResNet50Bottom, self).__init__() self.features = nn.Sequential(*list(original_model.children())[:-2]) def forward(self, x): x = self.features(x) return x res50_model = models.resnet50(pretrained=True) res50_conv2 = ResNet50Bottom(res50_model) outputs = res50_conv2(inputs) outputs.data.shape # => torch.Size([4, 2048, 7, 7])
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
1686 | 윈도우 raid ahci 전환 | WHRIA | 2019.12.26 | 37 |
1685 | android / capture and crop [5] | WHRIA | 2020.05.10 | 37 |
1684 | plum | WHRIA | 2020.04.03 | 38 |
1683 | youtube | WHRIA | 2016.09.30 | 39 |
1682 | lvm [2] | WHRIA | 2020.01.09 | 39 |
1681 | 회귀분석 종류 | WHRIA | 2020.04.14 | 39 |
1680 | sql replication 성공 [1] | WHRIA | 2020.02.20 | 40 |
1679 | 서피스 3 질렀다. ㅎㅎ | WHRIA | 2015.12.15 | 41 |
1678 | webapp [1] | WHRIA | 2020.05.10 | 41 |
1677 | nvidia docker | WHRIA | 2020.01.15 | 42 |
1676 | acquihire [1] | WHRIA | 2020.05.05 | 42 |
1675 | onnx broswer | WHRIA | 2020.09.15 | 42 |
1674 | multiple NIC ubuntu [6] | WHRIA | 2020.03.10 | 43 |
1673 | raid 6 | WHRIA | 2020.07.23 | 43 |
1672 | batch normalize | WHRIA | 2020.02.06 | 44 |
https://discuss.pytorch.org/t/how-to-extract-features-of-an-image-from-a-trained-model/119/3