0

I'm working at converting pytorch model to openvino IR, the nn of my pytorch is vgg16, and the method is faster rcnn, there is a weird problem when I debug the code.

when I run the following code

fc7 = self.classifier(pool, abc="abc123")

the pool object is OpenVinoTensor, abc="abc123" is the test parameters for debuging. And the classifier is defined as following:

Sequential( (0): Linear(in_features=25088, out_features=4096, bias=True) (1): ReLU(inplace=True) (2): Linear(in_features=4096, out_features=4096, bias=True) (3): ReLU(inplace=True)

after self.classifier(pool, abc="abc123") is called, it calls torch.nn.Module._call_impl

def _call_impl(self, *input, **kwargs)

then I found the "input" here is '(ReLU_57,)', which is a tuple, I think it should be OpenVinoTensor, as well as "kwargs" is abc="abc123".

What happened after I call classifier?

Ben
  • 9
  • 4

1 Answers1

0

What happen when you call the classifier depends on what you had programmed the classifier function to do.

You may refer here for further understanding.

Plus, this is how a classifier in PyTorch works.

Rommel_Intel
  • 1,369
  • 1
  • 4
  • 8