Question 398 of 1,000
AI Implementation and OperationseasyMultiple ChoiceObjective-mapped

Troubleshooting Inference Errors Caused by Image Size Mismatch

This AI0-001 practice question tests your understanding of ai implementation and operations. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Exhibit

Refer to the exhibit.
```
[2024-03-15 10:32:17] ERROR: Exception when invoking model.
  Input tensor shape: [1, 224, 224, 3]
  Model expected shape: [1, 299, 299, 3]
  TensorFlow serving error: Input size mismatch
```

A developer sees the above error during inference on a deployed image classification model. What is the most likely cause?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "most likely"

    Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

Exhibit

Refer to the exhibit.
```
[2024-03-15 10:32:17] ERROR: Exception when invoking model.
  Input tensor shape: [1, 224, 224, 3]
  Model expected shape: [1, 299, 299, 3]
  TensorFlow serving error: Input size mismatch
```

Quick Answer

The correct answer is that the input images are not being resized to the required dimensions. This inference error due to image size mismatch occurs because most image classification models, such as ResNet or VGG, are trained on fixed-size tensors—typically 224x224 pixels—and the serving framework (like TensorFlow Serving or TorchServe) expects that exact shape. When a larger or differently sized image is fed directly, the tensor shape incompatibility triggers a runtime error. On the CompTIA AI+ AI0-001 exam, this question tests your understanding of model input preprocessing, a common pitfall when deploying models without a proper resize pipeline. A frequent trap is confusing this with color channel mismatches or data type errors, but the error message will explicitly reference shape or dimension. Memory tip: Think “Resize before you realize”—always match the model’s expected input dimensions before inference.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The input images are not being resized to the required dimensions

The error during inference is typically caused by a mismatch between the input tensor shape expected by the model and the shape of the provided image. Image classification models are trained on images of a fixed size. If input images are not resized to the required dimensions, the model's input layer expects a different shape, resulting in a shape mismatch error. Option B correctly identifies this as the most likely cause.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The model version is incompatible with the serving framework

    Why it's wrong here

    The error is about input shape, not framework compatibility.

  • The input images are not being resized to the required dimensions

    Why this is correct

    Model expects 299x299 but receives 224x224, so preprocessing is missing resizing.

    Clue confirmation

    The clue word "most likely" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The inference server does not support batch processing

    Why it's wrong here

    The error is about shape, not batching.

  • The model is overfitting to a specific image size

    Why it's wrong here

    Overfitting does not cause shape mismatch; the model architecture defines input size.

Common exam traps

Common exam trap: answer the scenario, not the keyword

CompTIA often tests the misconception that inference errors are caused by model versioning or server configuration, when the actual issue is a simple preprocessing step like image resizing that candidates overlook.

Detailed technical explanation

How to think about this question

Under the hood, the model's input layer defines a fixed tensor shape (e.g., [None, 224, 224, 3] for TensorFlow), and the serving framework (e.g., TensorFlow Serving using gRPC or REST) performs strict shape validation before inference. A common subtlety is that some frameworks allow dynamic shapes via placeholder dimensions, but many production models are exported with static shapes for performance optimization, making resizing mandatory. In real-world scenarios, a pipeline might include a preprocessing step (e.g., using OpenCV or Pillow) that resizes images, and if that step is skipped or misconfigured, the error surfaces.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A practitioner preparing for the AI0-001 exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related AI0-001 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free AI0-001 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this AI0-001 question test?

AI Implementation and Operations — This question tests AI Implementation and Operations — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: The input images are not being resized to the required dimensions — The error during inference is typically caused by a mismatch between the input tensor shape expected by the model and the shape of the provided image. Image classification models are trained on images of a fixed size. If input images are not resized to the required dimensions, the model's input layer expects a different shape, resulting in a shape mismatch error. Option B correctly identifies this as the most likely cause.

What should I do if I get this AI0-001 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More AI0-001 practice questions

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This AI0-001 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI0-001 exam.