I’ve qeustion about regression output features number.
Regression It is mentioned that out_features is 1.
but, code is
model.fc = torch.nn.Linear(512, 2)
Why second parameter value is 2 not 1?
Your answer will be helpful.
I’ve qeustion about regression output features number.
Regression It is mentioned that out_features is 1.
but, code is
model.fc = torch.nn.Linear(512, 2)
Why second parameter value is 2 not 1?
Your answer will be helpful.
Hi,
The description is for the basic ResNet model.
But roading following tutorial transfer learns the model into output with dimension=2.
It is used to represent the x and y values.
xy = model(preprocess(image)).detach().float().cpu().numpy().flatten()
x = xy[0]
y = (0.5 - xy[1]) / 2.0
Thanks.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.