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 | 우분투 7.10 으로 업그레이드 | WHRIA | 2007.12.03 | 7753 |
1683 | VirtualBox | WHRIA | 2007.10.07 | 7751 |
1682 | 비상 [1] | WHRIA | 2007.11.12 | 7745 |
1681 | partimage 사용법 | WHRIA | 2011.04.25 | 7743 |
1680 | Pidgin | WHRIA | 2007.09.01 | 7732 |
1679 | 토미그린 (tomygreen) 해외 핸드폰 (nexus 4) 에 설치하기 | WHRIA | 2013.04.03 | 7726 |
1678 | 이랬으면 좋겠네. | WHRIA | 2012.07.15 | 7723 |
1677 | Interpretation of the Outputs of Deep Learning Model Trained with Skin Cancer Dataset [1] | WHRIA | 2018.06.02 | 7706 |
1676 | 추석 | WHRIA | 2007.09.25 | 7703 |
1675 | frame | WHRIA | 2008.12.11 | 7695 |
1674 | Minor update | WHRIA | 2007.08.09 | 7686 |
1673 | Face It. | WHRIA | 2007.08.09 | 7682 |
1672 | gomphoto 1.0.1 | WHRIA | 2013.01.10 | 7670 |
1671 | whria.net 복구 | WHRIA | 2012.12.09 | 7664 |
1670 | whria.net 홈페이지에 음악 삽입 | WHRIA | 2013.01.17 | 7618 |
https://discuss.pytorch.org/t/how-to-extract-features-of-an-image-from-a-trained-model/119/3