Skip to content
Permalink
Browse files

Merge pull request #26646 from amitsrivastava78:error_4

PiperOrigin-RevId: 238732653
  • Loading branch information...
tensorflower-gardener committed Mar 15, 2019
2 parents 623e667 + 0ff6589 commit 8b5a7c680b8672005f189051edbc3b28978810f2
@@ -135,7 +135,7 @@ TfLiteStatus ArenaPlanner::PlanAllocations() {
}

// Count references to node input tensors.
for (int i = 0; i < graph_info_->num_nodes(); ++i) {
for (size_t i = 0; i < graph_info_->num_nodes(); ++i) {
const TfLiteNode& node = graph_info_->node(i);
TfLiteIntArray* node_inputs = node.inputs;
for (int j = 0; j < node_inputs->size; ++j) {
@@ -204,7 +204,7 @@ class SingleOpModel {
const int channel_index = params->quantized_dimension;

std::vector<int32_t> shape(t->dims->size);
for (int i = 0; i < shape.size(); ++i) {
for (size_t i = 0; i < shape.size(); ++i) {
shape[i] = t->dims->data[i];
}
const int32_t num_inputs = input_data.size();
@@ -40,18 +40,6 @@ void RunTestPermutation(const std::vector<int>& shape,
input[i] = i;
}

// Create reversed and padded perms.
int reversed_perms[4];
for (int output_k = 0, input_k = shape.size() - 1; output_k < shape.size();
output_k++, input_k--) {
reversed_perms[output_k] = shape.size() - perms[input_k] - 1;
}
// Unused dimensions should not be permuted so pad with identity transform
// subset.
for (int k = shape.size(); k < 4; k++) {
reversed_perms[k] = k;
}

// Make input and output shapes.
const RuntimeShape input_shape = GetTensorShape(shape);
RuntimeShape output_shape(perms.size());

0 comments on commit 8b5a7c6

Please sign in to comment.
You can’t perform that action at this time.