I tried to that earlier:
def make_layers_legacy(cfg, batch_norm=False):
    layers = []
    in_channels = 3
    for v in cfg:
        if v == 'M':
            layers += [lnn.SpatialMaxPooling(kW=0, kH=0, dW=None, dH=None, padW=0, padH=0)]
        else:
            conv = lnn.SpatialConvolution(nInputPlane, nOutputPlane, kW, kH, dW=1, dH=1, padW=0, padH=None)
            if batch_norm:
                layers += [conv, lnn.SpatialBatchNormalization(v), lnn.ReLU(inplace=True)]
            else:
                layers += [conv, lnn.ReLU(inplace=True)]
            in_channels = v
    return lnn.Sequential(*layers)

cfg = {
    'A': [64, 'M', 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512, 'M'],
    'B': [64, 64, 'M', 128, 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512, 'M'],
    'D': [64, 64, 'M', 128, 128, 'M', 256, 256, 256, 'M', 512, 512, 512, 'M', 512, 512, 512, 'M'],
    'E': [64, 64, 'M', 128, 128, 'M', 256, 256, 256, 256, 'M', 512, 512, 512, 512, 'M', 512, 512, 512, 512, 'M'],
}

model = VGG(make_layers_legacy(cfg['E']), **kwargs)

But I can’t seem to figure out how to setup the code from that script in a way that replaces the appropriate layers:
NameError: global name 'nInputPlane' is not defined
I tried looking at Torch to PyTorch conversion scripts, but they didn’t seem to have the relevant information on how I can properly setup the code in make_layers_legacy.
I also have no idea where to start on changing:
    def _initialize_weights(self):
        for m in self.modules():
            if isinstance(m, nn.Conv2d):
                #n = m.kernel_size[0] * m.kernel_size[1] * m.out_channels
                m.weight.data.normal_(0, math.sqrt(2. / n))
                if m.bias is not None:
                    m.bias.data.zero_()
            elif isinstance(m, nn.BatchNorm2d):
                m.weight.data.fill_(1)
                m.bias.data.zero_()
            elif isinstance(m, nn.Linear):
                m.weight.data.normal_(0, 0.01)
                m.bias.data.zero_()

It would nice is there was a torchvision.legacy.models like there is for nn and optim.