Fix HARD_SWISH rank requirement

Also add rank check to HARD_SWISH validation.
This commit removes nnAssert from the utility function that converts
NNAPI Shape to TF Lite's RuntimeShape. The assert would cause a crash if
the function was passed a shape with rank > 4 even though RuntimeShape
supports such shapes.

Bug: 152945527
Bug: 139957496
Test: NNTest_static
Change-Id: I69147915669bee525c8883e48fd53ff0f899a501
Merged-In: I69147915669bee525c8883e48fd53ff0f899a501
(cherry picked from commit 1d32b17d97f49eaa250aafc3cf825da4c8098d93)
4 files changed