I also met a similar problem on pytorch 1.5.1. The case is a bit different. I am trying to read from lmdb via msgpack. I have to change the code from:
img_dump = msgpack.loads(dump, raw=False)

to
img_dump = {k: np.copy(v) for k, v in msgpack.loads(dump, raw=False).items()}

using numpy.copy.