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
你好,我想问一下就是最后求权重梯度的。
1.我的各个门的输出变量的维度是(batchsize,hiddensize),输入变量x的维度是(batchsize,inputsize),因为我有batchsize嘛,所以想batchsize中的每个样本单独计算,但是现在的维度并不一致。δ(t)C⊙C(t−1)⊙f(t)⊙(1−f(t))计算完的维度是(hiddensize),然而,h(t−1)的维度也是(hiddensize),(h(t−1))T转置之后的维度是(1,hiddensize),这样进行矩阵乘法后,计算出来的维度是1,但我的Wfh的维度是(hiddensize,hiddensize)啊,后来对于这个问题,我用δ(t)C⊙C(t−1)⊙f(t)⊙(1−f(t)) * h(t−1).unsqueeze(dim=1),这样维度对了,请问这样可以嘛?
2.当为计算Wfx的维度的时候,δ(t)C⊙C(t−1)⊙f(t)⊙(1−f(t))计算完的维度是(hiddensize),然而,x(t)的维度是(inputsize),两者又出现不一致的情况,我又将矩阵乘法改成了δ(t)C⊙C(t−1)⊙f(t)⊙(1−f(t)).unsqueeze(dim=1) * x(t).unsqueeze(dim=0),不知道这样写严不严谨?
希望能得到您的帮助
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
你好,我想问一下就是最后求权重梯度的。
1.我的各个门的输出变量的维度是(batchsize,hiddensize),输入变量x的维度是(batchsize,inputsize),因为我有batchsize嘛,所以想batchsize中的每个样本单独计算,但是现在的维度并不一致。δ(t)C⊙C(t−1)⊙f(t)⊙(1−f(t))计算完的维度是(hiddensize),然而,h(t−1)的维度也是(hiddensize),(h(t−1))T转置之后的维度是(1,hiddensize),这样进行矩阵乘法后,计算出来的维度是1,但我的Wfh的维度是(hiddensize,hiddensize)啊,后来对于这个问题,我用δ(t)C⊙C(t−1)⊙f(t)⊙(1−f(t)) * h(t−1).unsqueeze(dim=1),这样维度对了,请问这样可以嘛?
2.当为计算Wfx的维度的时候,δ(t)C⊙C(t−1)⊙f(t)⊙(1−f(t))计算完的维度是(hiddensize),然而,x(t)的维度是(inputsize),两者又出现不一致的情况,我又将矩阵乘法改成了δ(t)C⊙C(t−1)⊙f(t)⊙(1−f(t)).unsqueeze(dim=1) * x(t).unsqueeze(dim=0),不知道这样写严不严谨?
希望能得到您的帮助
The text was updated successfully, but these errors were encountered: