Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The output logit tensor is resized twice. #1529

Closed
ChenDirk opened this issue Apr 28, 2022 · 1 comment
Closed

The output logit tensor is resized twice. #1529

ChenDirk opened this issue Apr 28, 2022 · 1 comment
Assignees

Comments

@ChenDirk
Copy link

Hello,
I find a small bug when I export onnx file. The output logit tensor is resized twice in the onnx file, before softmax opration. The problem is in mmsegmentation/mmseg/models/segmentors/encoder_decoder.py file, in the 'encode_decode' function, the output is resized at the first time(line 75), and the output is resized at the second time in the 'whole_inference' function(line 210). In my mind, they are repetitive and unnecessary.

@RunningLeon
Copy link
Collaborator

@ChenDirk Hi, it seems you're right. The exporting to ONNX follows original PyTorch pipeline. @MeowZheng Could you explain why there are two resizes here? Whether they can be merged into one?

aravind-h-v pushed a commit to aravind-h-v/mmsegmentation that referenced this issue Mar 27, 2023
The mask and instance image were being cropped in different ways without --center_crop, causing the model to learn to ignore the mask in some cases. This PR fixes that and generate more consistent results.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants