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])
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
259 | fast rcnn cudnn 5.0 | WHRIA | 2017.01.08 | 177 |
258 | SAS controller SAS 9212-4i | WHRIA | 2019.12.08 | 176 |
257 | kakao | WHRIA | 2018.02.25 | 174 |
256 | stuff [2] | WHRIA | 2019.07.15 | 173 |
255 | KMA 연수교육 주소 | WHRIA | 2016.10.05 | 171 |
254 | Visual Studio 필요없는 파일 삭제 for SVN | WHRIA | 2016.09.04 | 169 |
253 | 모든 code 를 python3 로 migration 중 | WHRIA | 2019.06.08 | 168 |
252 | Micro- and macro-averages | WHRIA | 2019.11.28 | 168 |
251 | scx 4623f reset / memory [2] | WHRIA | 2016.01.23 | 167 |
250 | delayed network drive connect | WHRIA | 2018.10.07 | 167 |
249 | indexeddb [2] | WHRIA | 2021.02.07 | 167 |
248 | distributed training [2] | WHRIA | 2019.10.30 | 165 |
» | model split [1] | WHRIA | 2020.07.30 | 165 |
246 | PHP7 으로 업그레이드 | WHRIA | 2016.05.05 | 163 |
245 | 이궁 | WHRIA | 2019.03.12 | 159 |
https://discuss.pytorch.org/t/how-to-extract-features-of-an-image-from-a-trained-model/119/3