完整报错信息如下
RuntimeError: set_sizes_and_strides is not allowed on a Tensor created from .data or .detach().
If your intent is to change the metadata of a Tensor (such as sizes / strides / storage / storage_offset)
without autograd tracking the change…
家人们来看看是不是报这个 warning:
[W reducer.cpp:283] Warning: Grad strides do not match bucket view strides.
This may indicate grad was not created according to the gradient layout contract,
or that the params strides changed since DDP was constructed.…