| 106 | } |
| 107 | |
| 108 | core::TensorValue gate_slice( |
| 109 | core::ModuleBuildContext & ctx, |
| 110 | const core::TensorValue & gates, |
| 111 | int64_t hidden_size, |
| 112 | int64_t gate_index) { |
| 113 | return SliceModule({1, gate_index * hidden_size, hidden_size}).build(ctx, gates); |
| 114 | } |
| 115 | |
| 116 | void validate_sequence_config(const LSTMSequenceConfig & config) { |
| 117 | if (config.input_size <= 0 || config.hidden_size <= 0) { |
no test coverage detected