Add a warning when doing infer_shape but when the inputs have dimensions of the same size.

This can hid error.
remove import not used detected by flymake
remove not used var.
remove print in test
Update comment and add doc about the new warning in the infer_shape tester.
Merge pull request #1258 from nouiz/warn_infer_shape_test

Warn infer shape test