Implemented infer_shape on cudnn ops.

idem about border_mode and pad.