Warning:grad and param do not obey the gradient layout contract

When I try my network,the following warnings occurred:
[W accumulate_grad.h:185] Warning: grad and param do not obey the gradient layout contract. This is not an error, but may impair performance.
[1,2]:grad.sizes() = [128, 2, 1, 1], strides() = [2, 1, 1, 1]

What is the reason for this? How can I correct it?