-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix ckpt conversion bug #2399
Fix ckpt conversion bug #2399
Conversation
default="", | ||
type=str, | ||
help='dict of name adder, e.g."{\"key1\": \"value1\"}"') | ||
parser.add_argument( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yapf was complaining
@@ -39,18 +41,22 @@ def main(): | |||
|
|||
state = torch.load(args.input_ckpt, map_location="cpu") | |||
new_state = {} | |||
|
|||
if args.remove_list: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it skips cloning the weight if remove_list is empty
wenet/transformer/search.py
Outdated
@@ -175,7 +175,7 @@ def ctc_prefix_beam_search( | |||
next_score1.ns = log_add(next_score1.ns, | |||
prefix_score.ns + prob) | |||
if next_score1.v_ns < prefix_score.v_ns + prob: | |||
next_score1.vs_ns = prefix_score.v_ns + prob | |||
next_score1.v_ns = prefix_score.v_ns + prob |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
there seems to be a clang format version mismatch in pre commit hook and github workflow |
|
pulled in the version fix from main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx
A bug was introduced in #2381, basically it will skip copying all the weight if remove_list is empty.