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 | 윈도우 raid ahci 전환 | WHRIA | 2019.12.26 | 64 |
153 | test | WHRIA | 2020.12.03 | 64 |
152 | 서피스 3 질렀다. ㅎㅎ | WHRIA | 2015.12.15 | 63 |
151 | zerohq encryption [5] | WHRIA | 2020.04.23 | 62 |
150 | amp distributed pytorch [1] | WHRIA | 2020.07.14 | 62 |
149 | insync | WHRIA | 2023.02.09 | 61 |
148 | cloudfront | WHRIA | 2023.04.09 | 61 |
147 | 감가상각 계산 | WHRIA | 2015.11.30 | 59 |
146 | acquihire [1] | WHRIA | 2020.05.05 | 59 |
145 | software validation [1] | WHRIA | 2020.05.10 | 59 |
144 | boost 1.35 build | WHRIA | 2016.05.01 | 57 |
143 | 의료영상분석장치 분류 코드 | WHRIA | 2020.04.22 | 57 |
142 | mysql 암호화 [2] | WHRIA | 2020.04.24 | 57 |
141 | CE | WHRIA | 2020.05.17 | 57 |
140 | 학술저널 받는법 | WHRIA | 2015.11.30 | 56 |
https://discuss.pytorch.org/t/how-to-extract-features-of-an-image-from-a-trained-model/119/3