    Redundant batch_flatten removed for 2D input matrix in Dense layer. (#9792)
    Redundant batch_flatten removed for 2D input matrix in Dense layer. (#9792)

* Redundant batch_flatten removed for 2D input matrix in Dense layer.

* Fix to follow code review. infer_type for input[0] is called once.
dmlc/tvm,Laurawly/tvm-1,dmlc/tvm,dmlc/tvm,Laurawly/tvm-1,Laurawly/tvm-1,Laurawly/tvm-1,dmlc/tvm,Laurawly/tvm-1,dmlc/tvm,dmlc/tvm,Laurawly/tvm-1,dmlc/tvm,Laurawly/tvm-1,dmlc/tvm,dmlc/tvm,Laurawly/tvm-1,Laurawly/tvm-1,Laurawly/tvm-1