fix: conv parameter check failure#3428
Merged
Merged
Conversation
zewenli98
reviewed
Mar 6, 2025
Collaborator
zewenli98
left a comment
There was a problem hiding this comment.
Good catch! Can you confirm if stride or dilation need to do the same changes or not?
Collaborator
Author
Good catch! I missed that. The same error occurs for list_dilation, e.g., param("list_dilation", 2, dilation=[3]), just like with padding. I have updated the code to properly handle list inputs for dilation and stride, ensuring they are correctly converted into tuples for the conv layer. Additionally, I have revised the method for checking 1D convolution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes an issue where padding values given as a single-element list (e.g.,
[0]and[1]) were not properly converted inconvNd, leading to a TensorRT error:For the padding value
[1], this also caused shape mismatches, such as:If
paddingis[0], it still triggers a TensorRTparamater check failure error, but the final output is correct. This is a minor issue that doesn’t affect functionality.Fix
paddingis a list with one element, it is expanded properly ((1,1)for conv2d,(1,1,1)for conv3d, etc.).Fixes #(issue)
Type of change
Please delete options that are not relevant and/or add your own.
Checklist: