Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以,我正在使用:torch.nn.CrossEntropyLoss(predictions, targets),我想知道为什么目标需要是 64 位整数而不是 32 位?
torch.nn.CrossEntropyLoss(predictions, targets)
我想知道为什么目标需要是 64 位整数而不是 32 位?
这是因为 PyTorch 是预编译的。它之前的一些其他框架(不是 Tensorflow)会即时调用编译器,这可能会导致延迟和其他一些不愉快。PyTorch 没有。但这意味着开发人员必须注意预编译库的大小。他们必须在支持另一种数据类型的效用与为该数据类型编译所有内容所导致的大小增加之间取得平衡,而这里的决定反对int32, uint32,uint64等。
int32
uint32
uint64