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])
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
1579 | LG 21 세기 brain hunt - USA | WHRIA | 2019.05.23 | 437 |
1578 | pROC package [3] | WHRIA | 2019.05.11 | 161 |
1577 | 이미지 비교 [1] | WHRIA | 2019.04.23 | 122 |
1576 | label noise [1] | WHRIA | 2019.04.18 | 540 |
1575 | 드리블 | WHRIA | 2019.04.12 | 80 |
1574 | high impact journals | WHRIA | 2019.04.07 | 127 |
1573 | color pallate | WHRIA | 2019.04.07 | 64 |
1572 | good luck ! | WHRIA | 2019.03.21 | 315 |
1571 | swap memory | WHRIA | 2019.03.14 | 63 |
1570 | 이궁 | WHRIA | 2019.03.12 | 144 |
1569 | HASh benchmark | WHRIA | 2019.03.10 | 436 |
1568 | opencv rotate | WHRIA | 2019.03.09 | 117 |
1567 | mAP 계산법 | WHRIA | 2019.02.24 | 45576 |
1566 | t test | WHRIA | 2019.02.13 | 101 |
1565 | 전세금 돌려받는 법 | WHRIA | 2019.02.11 | 221 |
https://discuss.pytorch.org/t/how-to-extract-features-of-an-image-from-a-trained-model/119/3