[ONNX] Handle NoneType in Assign Output Shapes (#54623) (#57602)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/57602
Needed for ONNX Export of Huggingface-reformer models
Test Plan: Imported from OSS
Reviewed By: malfet
Differential Revision: D28393517
Pulled By: SplitInfinity
fbshipit-source-id: bab6f91e624bb31e804fe2cf7ec0970164a6f29e
Co-authored-by: shubhambhokare1 <shubhambhokare1@gmail.com>