@@ -10,15 +10,15 @@ namespace hannk {
1010// and remove the 'LstmElementwiseOp' op.
1111OpPtr lower_tflite_lstm (TensorPtr data_input, TensorPtr prev_activ_input, TensorPtr weights_input, TensorPtr biases_input, TensorPtr prev_state_input,
1212 TensorPtr activ_output, TensorPtr state_output, TensorPtr concat_temp, TensorPtr activ_temp,
13- ActivationFunction activation ) {
13+ ActivationFunction activation_fn ) {
1414 std::vector<TensorPtr> inputs = {data_input, prev_activ_input, weights_input, biases_input, prev_state_input};
1515 std::vector<TensorPtr> outputs = {activ_output, state_output};
1616
1717 std::vector<OpPtr> ops;
1818
1919 std::vector<TensorPtr> concat_inputs = {data_input, prev_activ_input};
2020 ops.push_back (make_op<ConcatenationOp>(concat_inputs, concat_temp, 0 ));
21- ops.push_back (lower_tflite_fullyconnected (concat_temp, weights_input, biases_input, activ_temp, activation ));
21+ ops.push_back (lower_tflite_fullyconnected (concat_temp, weights_input, biases_input, activ_temp, activation_fn ));
2222
2323 // Split activ_temp into the 4 ops we need.
2424 Box elementwise_bounds = activ_temp->bounds ();
@@ -61,12 +61,12 @@ OpPtr lower_tflite_lstm(TensorPtr data_input, TensorPtr prev_activ_input, Tensor
6161 auto prev_state_times_forget_state = p.mul (forget_gate_output, prev_state);
6262
6363 auto state = p.add (input_times_input_modulation, prev_state_times_forget_state);
64- auto activ = p.mul_add (output_gate_output, p.tanh (7 , state, q - 4 ), 128 );
64+ auto activation = p.mul_add (output_gate_output, p.tanh (7 , state, q - 4 ), 128 );
6565 // Reload new_state so it's in the right place for the outputs.
6666 // TODO: Make the assembler smart enough to do this itself.
6767 state = p.add (state, 0 );
6868
69- auto program_buf = p.assemble ({activ , state});
69+ auto program_buf = p.assemble ({activation , state});
7070 program_buf = program_buf.copy ();
7171
7272 ops.push_back (make_op<ElementwiseProgramOp>(elementwise_inputs, elementwise_outputs, program_buf));
0 commit comments