r2.11 cherry-pick: 980b22536ab "Fixes shape inference of LookupTableImportV2 to handle scalar values."
Refer to the original commit: https://github.com/tensorflow/tensorflow/commit/980b22536abcbbe1b4a5642fc940af33d8c19b69