Pytorch 属性错误:';PngImageFile';对象没有属性';应用tfms';
当我使用Pytorch 属性错误:';PngImageFile';对象没有属性';应用tfms';,pytorch,Pytorch,当我使用learn.predict(img) 图像文件格式为png AttributeError: PngImageFile object has no attribute apply_tfms 谷歌PngImageFile=> 谷歌应用_tfms=> 这个电话期待一个fastai,但看起来你传递的是一个PIL图像 如果没有实际的代码就无法确定,但这似乎是一个可能的原因。请发布一个最小的、可运行的代码示例来说明问题。
learn.predict(img)
图像文件格式为png
AttributeError: PngImageFile object has no attribute apply_tfms
谷歌PngImageFile=>
谷歌应用_tfms=>
这个电话期待一个fastai,但看起来你传递的是一个PIL图像
如果没有实际的代码就无法确定,但这似乎是一个可能的原因。请发布一个最小的、可运行的代码示例来说明问题。