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])
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
1684 | multiple NIC ubuntu [6] | WHRIA | 2020.03.10 | 55 |
1683 | raid 6 | WHRIA | 2020.07.23 | 55 |
1682 | 학술저널 받는법 | WHRIA | 2015.11.30 | 56 |
1681 | 너무도 많이 변해버린 c++ | WHRIA | 2016.08.15 | 56 |
1680 | chatbot | WHRIA | 2020.04.03 | 56 |
1679 | boost 1.35 build | WHRIA | 2016.05.01 | 57 |
1678 | 의료영상분석장치 분류 코드 | WHRIA | 2020.04.22 | 57 |
1677 | mysql 암호화 [2] | WHRIA | 2020.04.24 | 57 |
1676 | software validation [1] | WHRIA | 2020.05.10 | 57 |
1675 | CE | WHRIA | 2020.05.17 | 57 |
1674 | 감가상각 계산 | WHRIA | 2015.11.30 | 59 |
1673 | acquihire [1] | WHRIA | 2020.05.05 | 59 |
1672 | zerohq encryption [5] | WHRIA | 2020.04.23 | 61 |
1671 | amp distributed pytorch [1] | WHRIA | 2020.07.14 | 61 |
1670 | insync | WHRIA | 2023.02.09 | 61 |
https://discuss.pytorch.org/t/how-to-extract-features-of-an-image-from-a-trained-model/119/3