| 5 | namespace megdnn { |
| 6 | |
| 7 | void LSTMCell::deduce_layout( |
| 8 | const TensorLayout& input, const TensorLayout& weight_ih, |
| 9 | const TensorLayout& bias_ih, const TensorLayout& hx, |
| 10 | const TensorLayout& weight_hh, const TensorLayout& bias_hh, |
| 11 | const TensorLayout& cx, TensorLayout& h_new, TensorLayout& c_new, |
| 12 | TensorLayout& gates) { |
| 13 | h_new = TensorLayout(hx, hx.dtype); |
| 14 | c_new = TensorLayout(cx, cx.dtype); |
| 15 | auto opr = handle()->create_operator<RNNCellForward>(); |
| 16 | opr->param().nonlineMode = param::RNNCell::NonlineMode::IDENTITY; |
| 17 | opr->deduce_layout(input, weight_ih, bias_ih, hx, weight_hh, bias_hh, gates); |
| 18 | } |
| 19 | |
| 20 | void LSTMCell::check_exec( |
| 21 | const TensorLayout& input, const TensorLayout& weight_ih, |
no test coverage detected