The last exercise asks to specify input_shape
, output_shape
and dtype
parameters. We can use either the model loaded from the disk or use the handle. Could someone please shed light on why these are required?
Why specify additional details when using KerasLayer?
Course Q&A
TensorFlow: Data and Deployment Specialization
Advanced Deployment Scenarios with TensorFlow
These are optional, but considered best and safe to pass. to avoid loading wrong model.
From the docs,
“Note: to work-around missing shape inference functionalities from functions created from FunctionDefs, in rare cases one has to pass an ‘output_shape’ and potentially ‘input_shape’ and ‘dtype’”