提交 74da0119 编写于 作者: X xuezhong

refine code

上级 d600d0ac
...@@ -64,7 +64,6 @@ def lstmp( ...@@ -64,7 +64,6 @@ def lstmp(
new_a[i] = max(new_a[i], -1.0 * clip) new_a[i] = max(new_a[i], -1.0 * clip)
new_a[i] = min(new_a[i], clip) new_a[i] = min(new_a[i], clip)
new_a = np.reshape(new_a, a.shape) new_a = np.reshape(new_a, a.shape)
#print('new' + str(new_a))
return new_a return new_a
if cell_clip > 0.0: if cell_clip > 0.0:
...@@ -103,9 +102,7 @@ def lstmp( ...@@ -103,9 +102,7 @@ def lstmp(
# compute one sequence # compute one sequence
seq_len = lod[0][i] seq_len = lod[0][i]
x = input[offset[i]:offset[i + 1], :] x = input[offset[i]:offset[i + 1], :]
#r_pre = np.dot(h0[i], w_rh) # 1 x P
r_pre = h0[i] r_pre = h0[i]
#r_pre = act_proj(r_pre)
c_pre = c0[i] # 1 x D c_pre = c0[i] # 1 x D
for j in range(seq_len): for j in range(seq_len):
# compute one step # compute one step
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册