diff --git a/lite/examples/super_resolution/ml/super_resolution.ipynb b/lite/examples/super_resolution/ml/super_resolution.ipynb index 425b5464363..abeb79e9d8a 100644 --- a/lite/examples/super_resolution/ml/super_resolution.ipynb +++ b/lite/examples/super_resolution/ml/super_resolution.ipynb @@ -200,12 +200,16 @@ "\n", "# Load TFLite model and allocate tensors.\n", "interpreter = tf.lite.Interpreter(model_path=esrgan_model_path)\n", - "interpreter.allocate_tensors()\n", + "\n", "# Get input and output tensors.\n", "input_details = interpreter.get_input_details()\n", "output_details = interpreter.get_output_details()\n", "\n", + "#Resize the input tensor.\n", + "interpreter.resize_tensor_input(input_details[0]['index'],[1,50,50,3])\n", + "interpreter.allocate_tensors()\n", + "\n", "# Run the model\n", "interpreter.set_tensor(input_details[0]['index'], lr)\n", "interpreter.invoke()\n",