Thank you so much this looks exactly what I wanted
Can you do a code review that will this work?
class Mymodel(nn.Module):
    def __init__(self):
        super(Mymodel, self).__init__()
        self.hidden_layer_output = nn.Sequential(*list(vgg.children())[:-1])
        self.vow_output = nn.Sequential(
                nn.Linear(512 * 7 * 7,4096),
                nn.ReLU(True),
                nn.Dropout(),
                nn.Linear(4096, 4096),
                nn.ReLU(True),
                nn.Dropout(),
                nn.Linear(4096, 10)
                )
        self.const_output = nn.Sequential(
                nn.Linear(512 * 7 * 7,4096),
                nn.ReLU(True),
                nn.Dropout(),
                nn.Linear(4096, 4096),
                nn.ReLU(True),
                nn.Dropout(),
                nn.Linear(4096, 10)
                )
    def forward(self, x):
        x=self.hidden_layer_output
        x = x.view(x.size(0),-1)
        x_vow_output = self.vow_output(x)
        y_const_output = self.const_output(x)
        return x_vow_output,y_const_output