Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
wuxun-zhang committed Jun 18, 2019
1 parent 7fde2f2 commit 2e31b21
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cpp-package/example/inference/imagenet_inference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ bool Predictor::CreateImageRecordIter() {
}

std::vector<index_t> shape_vec;
for(index_t i = 1; i < input_shape_.ndim(); i++)
for (index_t i = 1; i < input_shape_.ndim(); i++)
shape_vec.push_back(input_shape_[i]);
mxnet::TShape data_shape(shape_vec.begin(), shape_vec.end());

Expand Down Expand Up @@ -320,7 +320,7 @@ void Predictor::InitParameters() {
Xavier xavier(Xavier::uniform, Xavier::avg, 2.0f);

auto arg_name_list = net_.ListArguments();
for(index_t i = 0; i < in_shapes.size(); i++) {
for (index_t i = 0; i < in_shapes.size(); i++) {
const auto &shape = in_shapes[i];
const auto &arg_name = arg_name_list[i];
int paramType = kFloat32;
Expand All @@ -334,7 +334,7 @@ void Predictor::InitParameters() {
}

auto aux_name_list = net_.ListAuxiliaryStates();
for(index_t i = 0; i < aux_shapes.size(); i++) {
for (index_t i = 0; i < aux_shapes.size(); i++) {
const auto &shape = aux_shapes[i];
const auto &aux_name = aux_name_list[i];
NDArray tmp_arr(shape, global_ctx_, false);
Expand Down Expand Up @@ -449,7 +449,7 @@ void Predictor::Score(int num_skipped_batches, int num_inference_batches) {
LG << "INFO:" << "Batch size = " << input_shape_[0] << " for inference";
LG << "INFO:" << "Accuracy: " << val_acc.Get();
LG << "INFO:" << "Throughput: " << (nBatch * input_shape_[0] / sec)
<< " images per second";
<< " images per second";
}

Predictor::~Predictor() {
Expand Down

0 comments on commit 2e31b21

Please sign in to comment.