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 | resilio sync 유저로 실행 [1] | WHRIA | 2019.01.28 | 1896 |
258 | xrdp ubuntu 18.04 mate startwm.sh | WHRIA | 2019.01.29 | 958 |
257 | ubuntu tweak | WHRIA | 2019.01.29 | 561 |
256 | LG 글로벌 | WHRIA | 2019.01.31 | 69 |
255 | 전세금 돌려받는 법 | WHRIA | 2019.02.11 | 223 |
254 | t test | WHRIA | 2019.02.13 | 103 |
253 | mAP 계산법 | WHRIA | 2019.02.24 | 45577 |
252 | opencv rotate | WHRIA | 2019.03.09 | 119 |
251 | HASh benchmark | WHRIA | 2019.03.10 | 436 |
250 | 이궁 | WHRIA | 2019.03.12 | 147 |
249 | swap memory | WHRIA | 2019.03.14 | 64 |
248 | good luck ! | WHRIA | 2019.03.21 | 316 |
247 | color pallate | WHRIA | 2019.04.07 | 68 |
246 | high impact journals | WHRIA | 2019.04.07 | 131 |
245 | 드리블 | WHRIA | 2019.04.12 | 84 |
https://discuss.pytorch.org/t/how-to-extract-features-of-an-image-from-a-trained-model/119/3