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])
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
154 | 궁금해서요... | 윤지완 | 2000.10.20 | 2075 |
153 | 이멜입니당.... | 한승석 | 2000.10.19 | 2217 |
152 | 하루종일 재미있게 지내는 법 | 한승석 | 2000.10.15 | 2106 |
151 | 외계 지적 생명체를 내 컴퓨터로 찾아 보자! | 김지현 | 2000.10.09 | 2115 |
150 | Re: 홈페이지 경연대회 끝났습니다. | 채영광 | 2000.10.07 | 2587 |
149 | 승석오빠 그룹원이요~ | 윤지완 | 2000.10.07 | 2334 |
148 | 와... 좋겠어요 ^^ | ^^ | 2000.10.06 | 2336 |
147 | 병욱임다... | 병욱 | 2000.10.05 | 2613 |
146 | 승석이형 저에요... | 김중희 | 2000.10.05 | 2595 |
145 | 옷 승석 추카추카... | 석원 | 2000.10.04 | 2656 |
144 | 야호~ | 한승석 | 2000.10.04 | 2875 |
143 | Re: 홈페이지 경연대회 끝났습니다. | 한승석 | 2000.10.04 | 2631 |
142 | 사랑한다는 것은 | 채영광 | 2000.10.04 | 2848 |
141 | Re: 홈페이지 경연대회 끝났습니다. | 영광 | 2000.10.04 | 2915 |
140 | 홈페이지 경연대회 끝났습니다. | 서울의대문화국 | 2000.10.03 | 3286 |
https://discuss.pytorch.org/t/how-to-extract-features-of-an-image-from-a-trained-model/119/3