Created by: jczaja
Changes discussed here are introducing invalidation of MKL-DNN format and layout stored in Tensor, when Tensor::Resize is called. Reason is that when Resize is called Tensor dims are to change so mkldnn format is no longer relevant. For example we have Tensor of 3D shape (mkldnn format: ncw) and then Resize is called to change Tensor dim's shape to 2D . Leaving format set to mkldnn::format::ncw may result in a functional problems later on.
Problem was detected when Transformer using MKL-DNN was executed, but using only one mkldnn op: "elementwise_add". Result was a crash. With this fix crash is not appearing.