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 | usb 3.1 + DP | WHRIA | 2020.01.07 | 168 |
273 | resnest50 caffe | WHRIA | 2020.06.21 | 166 |
272 | concat network [3] | WHRIA | 2020.08.27 | 166 |
271 | pytorch pretrained | WHRIA | 2020.10.28 | 166 |
270 | CORS | WHRIA | 2021.01.22 | 166 |
269 | 페이닥터 등록 | WHRIA | 2014.10.21 | 162 |
268 | pROC package [3] | WHRIA | 2019.05.11 | 160 |
267 | Transformer | WHRIA | 2020.10.09 | 160 |
266 | fast rcnn cudnn 5.0 | WHRIA | 2017.01.08 | 157 |
265 | yolo custom | WHRIA | 2019.07.25 | 157 |
264 | 역시 개원해서는 돈 버는 재미밖에 없다. | WHRIA | 2016.06.17 | 155 |
263 | SAS controller SAS 9212-4i | WHRIA | 2019.12.08 | 155 |
262 | stuff [2] | WHRIA | 2019.07.15 | 153 |
261 | startup , 미국 | WHRIA | 2020.07.30 | 153 |
260 | delayed network drive connect | WHRIA | 2018.10.07 | 152 |
https://discuss.pytorch.org/t/how-to-extract-features-of-an-image-from-a-trained-model/119/3