OpBLSTM

class OpBLSTM.BLSTMOpGrad(inplace)[source]
make_node(V_f, V_b, c_f, c_b, idx_f, idx_b, Dd_f, Dd_b, DY_f, DY_b, Y_f, Y_b, H_f, H_b)[source]
infer_shape(node, input_shapes)[source]
c_support_code()[source]
c_code(node, name, input_names, output_names, sub)[source]
c_code_cache_version()[source]
class OpBLSTM.BLSTMOp(inplace)[source]
make_node(Z_f, Z_b, V_f, V_b, c_f, c_b, i_f, i_b)[source]
Parameters:
  • Z_f – {input,output,forget} gate + cell state forward. 3d (time,batch,dim*4)
  • Z_b – {input,output,forget} gate + cell state backward. 3d (time,batch,dim*4)
  • V_f – forward recurrent matrix. 2d (dim,dim*4)
  • V_b – backward recurrent matrix. 2d (dim,dim*4)
  • c_f – initial forward cell state. 2d (batch,dim)
  • c_b – initial backward cell state. 2d (batch,dim)
  • i – index. 2d (time,batch) -> 0 or 1
c_support_code()[source]
c_code(node, name, input_names, output_names, sub)[source]
grad(inputs, output_grads)[source]
infer_shape(node, input_shapes)[source]
c_code_cache_version()[source]