We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
` def log_norm_step(self, inputs, states): """递归计算归一化因子 要点:1、递归计算;2、用logsumexp避免溢出。 技巧:通过expand_dims来对齐张量。 """ states = K.expand_dims(states[0], 2) inputs = K.expand_dims(inputs, 2) trans = K.expand_dims(self.trans, 0)
output = K.logsumexp(states+trans+inputs, 1) return output, [output] #`
这里上个时刻的结果 + 转移矩阵 + 这个时刻标签的分值然后再取e指数吧,望指正
The text was updated successfully, but these errors were encountered:
这里上个时刻的结果 + 转移矩阵 + 这个时刻标签的分值然后再取e指数求和吧,望指正
Sorry, something went wrong.
你的理解是错的。
1、请认真理解logsumexp的含义(log + sum + exp); 2、请认真理解 https://kexue.fm/archives/5542 中的(4),(5),(9)式,认真思考(9)式取对数后会是怎么样,不要自行幻想。
No branches or pull requests
` def log_norm_step(self, inputs, states):
"""递归计算归一化因子
要点:1、递归计算;2、用logsumexp避免溢出。
技巧:通过expand_dims来对齐张量。
"""
states = K.expand_dims(states[0], 2)
inputs = K.expand_dims(inputs, 2)
trans = K.expand_dims(self.trans, 0)
这里上个时刻的结果 + 转移矩阵 + 这个时刻标签的分值然后再取e指数吧,望指正
The text was updated successfully, but these errors were encountered: