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 | Re: 조직 게시판 주소(링크법) | Ryan | 2000.09.27 | 2688 |
1683 | 장문연습 따로 문장 파일로 올려 주세엽!! | ..... | 2000.09.27 | 2763 |
1682 | 장문연습에 글 따로 제 메일로 보내 주세엽~! | ..... | 2000.09.27 | 2666 |
1681 | 어쩌다가.. | 우혜진 | 2000.09.28 | 2514 |
1680 | 홈페이지 경연대회 끝났습니다. | 서울의대문화국 | 2000.10.03 | 3281 |
1679 | Re: 홈페이지 경연대회 끝났습니다. | 영광 | 2000.10.04 | 2908 |
1678 | 사랑한다는 것은 | 채영광 | 2000.10.04 | 2846 |
1677 | Re: 홈페이지 경연대회 끝났습니다. | 한승석 | 2000.10.04 | 2625 |
1676 | 야호~ | 한승석 | 2000.10.04 | 2870 |
1675 | 옷 승석 추카추카... | 석원 | 2000.10.04 | 2652 |
1674 | 승석이형 저에요... | 김중희 | 2000.10.05 | 2590 |
1673 | 병욱임다... | 병욱 | 2000.10.05 | 2609 |
1672 | 와... 좋겠어요 ^^ | ^^ | 2000.10.06 | 2330 |
1671 | 승석오빠 그룹원이요~ | 윤지완 | 2000.10.07 | 2329 |
1670 | Re: 홈페이지 경연대회 끝났습니다. | 채영광 | 2000.10.07 | 2581 |
https://discuss.pytorch.org/t/how-to-extract-features-of-an-image-from-a-trained-model/119/3