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 | test | WHRIA | 2020.12.03 | 65 |
153 | swap memory | WHRIA | 2019.03.14 | 64 |
152 | 서피스 3 질렀다. ㅎㅎ | WHRIA | 2015.12.15 | 63 |
151 | insync | WHRIA | 2023.02.09 | 63 |
150 | zerohq encryption [5] | WHRIA | 2020.04.23 | 62 |
149 | amp distributed pytorch [1] | WHRIA | 2020.07.14 | 62 |
148 | cloudfront | WHRIA | 2023.04.09 | 61 |
147 | 감가상각 계산 | WHRIA | 2015.11.30 | 60 |
146 | boost 1.35 build | WHRIA | 2016.05.01 | 59 |
145 | acquihire [1] | WHRIA | 2020.05.05 | 59 |
144 | software validation [1] | WHRIA | 2020.05.10 | 59 |
143 | multiple NIC ubuntu [6] | WHRIA | 2020.03.10 | 58 |
142 | mysql 암호화 [2] | WHRIA | 2020.04.24 | 58 |
141 | 너무도 많이 변해버린 c++ | WHRIA | 2016.08.15 | 57 |
140 | 의료영상분석장치 분류 코드 | WHRIA | 2020.04.22 | 57 |
https://discuss.pytorch.org/t/how-to-extract-features-of-an-image-from-a-trained-model/119/3