Skip to content

Commit f5d86dd

Browse files
committed
Fixed code style errors.
1 parent c98ec28 commit f5d86dd

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

tensorflow/lite/micro/kernels/xtensa/lstm_eval.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,8 @@ void LstmStepManager::UpdateBatch() {
473473
// Multi-batch for time_major input
474474
RuntimeShape LstmStepManager::InputShape() const {
475475
int batch_size = 1;
476-
if (size_info_.time_major || ((size_info_.batch_size > 1 && size_info_.time_steps == 1))) {
476+
if (size_info_.time_major ||
477+
(size_info_.batch_size > 1 && size_info_.time_steps == 1)) {
477478
batch_size = size_info_.batch_size;
478479
}
479480
const int dims[2] = {batch_size, size_info_.input_dimension};
@@ -485,7 +486,8 @@ RuntimeShape LstmStepManager::InputShape() const {
485486
// Multi-batch for time_major input
486487
RuntimeShape LstmStepManager::StateShape() const {
487488
int batch_size = 1;
488-
if (size_info_.time_major || (size_info_.batch_size > 1 && size_info_.time_steps == 1)) {
489+
if (size_info_.time_major ||
490+
(size_info_.batch_size > 1 && size_info_.time_steps == 1)) {
489491
batch_size = size_info_.batch_size;
490492
}
491493
const int dims[2] = {batch_size, size_info_.state_dimension};

tensorflow/lite/micro/kernels/xtensa/lstm_eval.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ void LstmStep(const LstmStepManager& step_info, const OpDataLSTM& op_data,
666666
const int batch_size = size_info.batch_size;
667667
const int time_steps = size_info.time_steps;
668668
const int num_batches = time_major == 0 ? (time_steps == 1 ? batch_size : 1)
669-
: step_info.batch_size();
669+
: step_info.batch_size();
670670
const int input_dimension = step_info.input_dimension();
671671
const int state_dimension = step_info.state_dimension();
672672

@@ -807,10 +807,10 @@ TfLiteStatus EvalLstm(const OpDataLSTM& op_data,
807807
// prepare for the next time step
808808
step_info.UpdateTime();
809809
}
810-
} else if(size_info.batch_size > 1 && size_info.time_steps == 1) {
810+
} else if (size_info.batch_size > 1 && size_info.time_steps == 1) {
811811
// Ramesh
812812
lstm_internal::LstmStep<ActivationType, WeightType, CellType, BiasType>(
813-
step_info, op_data, kernel_content, buffers);
813+
step_info, op_data, kernel_content, buffers);
814814
} else {
815815
for (int b = 0; b < size_info.batch_size; b++) {
816816
for (int t = 0; t < size_info.time_steps; t++) {

0 commit comments

Comments
 (0)