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 | popup | WHRIA | 2020.12.31 | 124 |
1578 | high impact journals | WHRIA | 2019.04.07 | 127 |
1577 | PHP7 으로 업그레이드 | WHRIA | 2016.05.05 | 130 |
1576 | 벤츠 E300 2010 년형 터치스크린 자가 수리 | WHRIA | 2015.12.25 | 133 |
1575 | fast rcnn | WHRIA | 2017.01.08 | 133 |
1574 | dkms for r8125 | WHRIA | 2020.11.12 | 134 |
1573 | 언어 , 국가 | WHRIA | 2023.04.15 | 137 |
1572 | 공유 메모리 예제 | WHRIA | 2016.09.09 | 138 |
1571 | 은행은 믿을 곳이 못 되는군... | WHRIA | 2019.07.12 | 138 |
1570 | Visual Studio 필요없는 파일 삭제 for SVN | WHRIA | 2016.09.04 | 139 |
1569 | indexeddb [2] | WHRIA | 2021.02.07 | 139 |
1568 | 나이 40에... | WHRIA | 2018.09.01 | 140 |
1567 | 이궁 | WHRIA | 2019.03.12 | 144 |
1566 | 모든 code 를 python3 로 migration 중 | WHRIA | 2019.06.08 | 149 |
» | model split [1] | WHRIA | 2020.07.30 | 149 |
https://discuss.pytorch.org/t/how-to-extract-features-of-an-image-from-a-trained-model/119/3