I am using re-resnet50 to do multi-label annottaion and the dataset is food101
But when I was running

model = senet.SENet50()
num_ftrs = model.linear.in_features # revising the categories classes
model.linear= nn.Linear(num_ftrs, len(targets))
ct = 0
for name, child in model.named_children():
ct += 1
if ct < 8:
for name2, params in child.named_parameters():
params.requires_grad = False
output = model(img_data)

It came out the problem:

image908×1498 38.3 KB

Here is the model:

image901×2158 38.1 KB

Can anyone tell me how to fix the problem?