TypeError empty received an invalid combination of arguments - got tuple dtype=NoneType device=NoneType but expected one of tuple of ints size tuple of names names torchmemory_format memory_format t
This error message is indicating that the empty() function was called with an invalid combination of arguments. The empty() function creates a new uninitialized tensor with a specified shape and data type.
The function expects either a tuple of integers specifying the shape of the tensor or a tuple of integers specifying the shape along with additional arguments such as data type, device, memory format, etc.
In this case, the function received a tuple, data type, and device as arguments, but this is not a valid combination of arguments. To fix the error, you should pass the correct combination of arguments that the empty() function expects.
原文地址: https://www.cveoy.top/t/topic/bDpF 著作权归作者所有。请勿转载和采集!