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 | CIDR 표기법 [1] | WHRIA | 2020.03.12 | 45 |
153 | mysql 암호화 [2] | WHRIA | 2020.04.24 | 45 |
152 | annotation service | WHRIA | 2020.05.03 | 45 |
151 | 식약청 메뉴 | WHRIA | 2020.05.14 | 45 |
150 | batch normalize | WHRIA | 2020.02.06 | 44 |
149 | zerohq encryption [5] | WHRIA | 2020.04.23 | 44 |
148 | exif javascript orientation | WHRIA | 2020.04.30 | 44 |
147 | multiple NIC ubuntu [6] | WHRIA | 2020.03.10 | 43 |
146 | raid 6 | WHRIA | 2020.07.23 | 43 |
145 | nvidia docker | WHRIA | 2020.01.15 | 42 |
144 | acquihire [1] | WHRIA | 2020.05.05 | 42 |
143 | onnx broswer | WHRIA | 2020.09.15 | 42 |
142 | 서피스 3 질렀다. ㅎㅎ | WHRIA | 2015.12.15 | 41 |
141 | webapp [1] | WHRIA | 2020.05.10 | 41 |
140 | sql replication 성공 [1] | WHRIA | 2020.02.20 | 40 |
https://discuss.pytorch.org/t/how-to-extract-features-of-an-image-from-a-trained-model/119/3