Add preparation code missed in some OPs

Bug: 63905942

This updates speech model related OPs: Embedding Lookup,
Hashtable Lookup, LSH Projection, LSTM, RNN, and SVDF.

Deduce the shape of an output or intermediate tensor.
Allocate memory if needed (i.e., not set by user).
Validate inputs (dimensions, etc.)

Minor cleanups related to the utility functions shared by these ops.

Also made necessary fixes and implementations as discovered while
doing this.

Test: NeuralNetworksTest

Change-Id: I7c0b789edb4d3565526d58905609d2023c1a5351
27 files changed
tree: 380569fee4db95c9ec118516b669959f53922a5d
  1. nn/
  2. Android.bp