-
Notifications
You must be signed in to change notification settings - Fork 118
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
[cli] switch to torch backend #227
Conversation
outputs = self.session.run(None, {"feats": feats}) | ||
embedding = outputs[0][0] | ||
pcm = pcm.to(torch.float) | ||
feats = kaldi.fbank(pcm, |
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.
重采样要不加一下
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.
我先合,你来加下。
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.
另外现在这个好像不能直接用gpu,我刚才测试gpu 的时候还是需要分步骤去做的,需要把feats 转cuda,模型转cuda,最后输出的再转回去
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.
from numpy.linalg import norm
这个import 需要留着的,下边要用
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.
这块未来都要改成 torch 相关的操作。
outputs = self.session.run(None, {"feats": feats}) | ||
embedding = outputs[0][0] | ||
pcm = pcm.to(torch.float) | ||
feats = kaldi.fbank(pcm, |
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.
另外现在这个好像不能直接用gpu,我刚才测试gpu 的时候还是需要分步骤去做的,需要把feats 转cuda,模型转cuda,最后输出的再转回去
No description provided.