There are a lot of extra outputs
Hi, I used the following code to dump the various onnx models, and when I opened it, I found that there was a lot of extra output, which is a bit strange I don't know if it was designed for what purpose
def model_convert_onnx(model1, input_shape1, output_path1):
dummy_input = torch.randn(1, 3, input_shape1[0], input_shape1[1])
input_names = ["input"]
output_names = ["output"]
torch.onnx.export(
model1,
dummy_input,
output_path1,
verbose=False,
keep_initializers_as_inputs=False,
opset_version=11,
input_names=input_names,
output_names=output_names,
)
if __name__ == '__main__':
model = MobileNetV4("MobileNetV4ConvSmall")
model.eval()
input_shape = (224, 224)
output_path = './MobileNetV4ConvSmall.onnx'
model_convert_onnx(model, input_shape, output_path)
print("model convert onnx finsh.")
but there are a lot of extra outputs
Hi @Hathamwang,
Thank you for interested in this project.
To answer first question (a lot of extra output), these outputs are the intermediate results in each of the layers that in the backbone. Usually, it can be used in U-Net kind of network architecture.
To your second question (it designed for what purpose), I just reproduce the whole MobileNetV4 architecture for people who can easily plug in to their own project either in classification, detection, segmentation etc.
Cheers and happy learning 😉 !
Regards Jai Wei
thank you so much for your help on the project! Your patience and timely responses to my questions have been a lifesaver. I really appreciate the way you took the time to explain things and offer guidance.