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])
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
274 | 외로움 | 한승석 | 2003.01.27 | 2081 |
273 | 승석이가 피부과에 합격했답니다. | 한승석 | 2003.01.10 | 2295 |
272 | 여기는 집입니다~ | 한승석 | 2003.01.10 | 2080 |
271 | 아래 주소는 새 홈페이지 주소입니다. | 한승석 | 2002.06.19 | 2094 |
270 | WHRIA WORLD (http://whria.net) | 한승석 | 2002.04.12 | 14101 |
269 | http://www.dnsart.com:7777/myip.php | te | 2002.04.05 | 1956 |
268 | TS로 시작하는 보람찬 인턴~~ | 쫑알이 | 2002.02.23 | 2078 |
267 | Massive Storage v 1.003 | 한승석 | 2002.02.19 | 2062 |
266 | MASSIVE STORAGE PROJECT | 승석 | 2002.02.06 | 2173 |
265 | Re: 별과 소년 (맞나..? --;;) | 검사자 | 2002.02.06 | 2051 |
264 | 별과 소년 (맞나..? --;;) | homework | 2002.02.05 | 2056 |
263 | DONKEY2000 당나귀 | 한승석 | 2002.02.05 | 1936 |
262 | 헐~~ | 별소년 | 2002.02.05 | 2068 |
261 | 별과 승석 | 200자작문 | 2002.02.05 | 2058 |
260 | 구경왔어여~~ ^^* | 얌~* | 2002.02.04 | 2083 |
https://discuss.pytorch.org/t/how-to-extract-features-of-an-image-from-a-trained-model/119/3