TensorInferenceFunction checks
Summary: Added OpSchema::NeedsAllInputShapes wrapper around the TensorInferenceFunction to fix exception when referencing the dim array when the input shape was unknown. There may be other operators that could use a similar change, these are just the ones that was causing InferShapesAndTypes throw an exception for my examples.
Test Plan: Tested with notebook n352716
Differential Revision: D23745442
fbshipit-source-id: d63eddea47d7ba595e73c4693d34c790f3a329cc