从AI Studio上拷的fine-tune预训练模型的代码,到本地就出现ValueError
收藏
会是什么原因呢?看网上一些说paddle支持'float32'而不支持'float64'导致的,但我也没找着问题出在哪儿。
报错信息:ValueError: (InvalidArgument) The type of data we are trying to retrieve does not match the type of data currently contained in the container.
[Hint: Expected dtype() == paddle::experimental::CppTypeToDataType::Type(), but received dtype():5 != paddle::experimental::CppTypeToDataType::Type():7.] (at ..\paddle\phi\core\dense_tensor.cc:137)
[operator < accuracy > error]
0
收藏
请登录后评论
有没有具体的代码可以贴一下,看这个报错确实是类型不匹配导致的,你可以试试转换一下输入,比如input放入模型之前,写一行代码,转换成float32的类型。