Has anyone try to use custom head with models other than resnet34?

When I tried to build a learner with other arch like vgg16, I’ve got an error but for resnet34 seems to work fine. Does anyone have the same experience?

May be u should get useful idea from this
body = create_body(arch,True,-1)
h = create_head(num_features_model(body) * 2,256,[512],0.5,False)
self.cnn= nn.Sequential( body,h)
self.head = nn.Linear(num_features_model(self.cnn), 1)