I want to use pre-training resnet50 model to do classification problem.
But my data set not only images, but also variable term.
I get the 2048 neurons after remove last layer now.
How to merge the variable term(I have 16) to the 2048 neurons and then get 2064 neurons?
And do fully connected layer to my output layer(My prediction is 2).
Here is my pytorch code:

import torch
from torch import nn
from torchvision import models as modelset
#Pretraining model
resnet50 = modelset.resnet50()
#Remove output layer
#Known the forward will return 2048 neurons
model = nn.ModuleList(list(resnet50.children())[:-1])
#I want to merge 16 neurons and 2048 neurons
#Then the return become 2064 neurons
#And Use the 2064 neurons do fc to 2 output.

Actually, I have keras code, but don’t known how to code in pytorch,
here is keras code:

def CustomResNet():
Net = CreateResNet(include_top=True, weights=“imagenet”, input_tensor=None,
input_shape=(224,224,3), pooling=None, classes=1000)
ImageInput     = Net.input
ImageOutput = Net.layers[-2].output
ImageNet         = Model(inputs=ImageInput, outputs=ImageOutput)
VariableInput = Input(shape=(16,))
ModelNet = keras.layers.concatenate([ImageNet.output, VariableInput])
PredictOutput = Dense(2, activation ='softmax')(ModelNet)
TheModel = Model(inputs=[ImageInput, VariableInput], outputs=PredictOutput)
return(TheModel)