Keep the dim_type of hinted shape as BATCH if possible (#17734)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17734
If input is not BATCH, we will skip adjust its batch size during onnxifi transformation. So when we take hints, we take it as CONSTANT but later need to change it to BATCH if possible.
Reviewed By: jackm321
Differential Revision: D14355983
fbshipit-source-id: 63eb54a44afb1565c71486fdd73db07ca0ac4fd4