Hi,
Following the approaches seen, I tried to add a second output to mobilenet_v3 using the following:
class MBN_v3(torch.nn.Module):
def __init__(self, num_classes1, num_classes2):
super(MBN_v3, self).__init__()
self.model_resnet = mobilenet_v3_small(pretrained=True)
self.model_resnet.fc = torch.nn.Identity()
self.classifier1 = torch.nn.Linear(1024, num_classes1)
self.classifier1 = torch.nn.Linear(1024, num_classes2)
def forward(self, x):
x = self.model_resnet(x)
out1 = self.classifier1(x)
out2 = self.classifier2(x)
return out1, out2
The self.classifer1 tagging seem to the one causing an error but I am not sure how to interpret the following output (with some omissions):
** On entry to SGEMM parameter number 10 had an illegal value
Traceback ...
packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, **kwargs)
...
line 1051, in _call_impl return forward_call(*input, **kwargs) return F.linear(input, self.weight, self.bias)
...
line 1847, in linear return torch._C._nn.linear(input, weight, bias)
RuntimeError: CUDA error: CUBLAS_STATUS_INVALID_VALUE when calling `cublasSgemm( handle, opa, opb, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc)`
Any insight or suggestion would be highly appreciated!
P