| 108 | |
| 109 | |
| 110 | class thermal_module(nn.Module): |
| 111 | def __init__(self, arch='resnet50'): |
| 112 | super(thermal_module, self).__init__() |
| 113 | |
| 114 | model_t = resnet50(pretrained=True, |
| 115 | last_conv_stride=1, last_conv_dilation=1) |
| 116 | # avg pooling to global pooling |
| 117 | self.thermal = model_t |
| 118 | |
| 119 | def forward(self, x): |
| 120 | x = self.thermal.conv1(x) |
| 121 | x = self.thermal.bn1(x) |
| 122 | x = self.thermal.relu(x) |
| 123 | x = self.thermal.maxpool(x) |
| 124 | return x |
| 125 | |
| 126 | |
| 127 | class base_resnet(nn.Module): |