我遵循简单的回归教程,在调用丢失函数时,尝试使用二维输入空间时,会得到以下错误。
RuntimeError: !(has_different_input_dtypes && !config.promote_inputs_to_common_dtype_ && (has_undefined_outputs || config.enforce_safe_casting_to_output_ || config.cast_common_dtype_to_outputs_)) INTERNAL ASSERT FAILED at "../aten/src/ATen/TensorIterator.cpp":405, please report a bug to PyTorch. 我不太清楚这意味着什么。除了培训数据之外,所有内容仍然是:https://github.com/cornellius-gp/gpytorch/blob/master/examples/01_Exact_GPs/Simple_GP_Regression.ipynb
发布于 2022-10-06 10:01:29
问题是我对火炬张量的转换。
我用:torch.from_numpy(array)代替我应该使用:torch.tensor(array)
这很奇怪,但现在没有问题了。
https://stackoverflow.com/questions/73971653
复制相似问题