I just encountered the same warning. I found that it’s because of initializing parameters in the in-place manner, like
conv.weight.data = NEW_WEIGHT.
However, I avoid this by rewriting the code to
conv.weight.data.fill_(0)
conv.weight.data += NEW_WEIGHT