Git Product home page Git Product logo

Comments (11)

imKeith avatar imKeith commented on June 5, 2024

解决了

from facial-expression-recognition.pytorch.

xurui123456 avatar xurui123456 commented on June 5, 2024

解决了
怎么实现的

from facial-expression-recognition.pytorch.

imKeith avatar imKeith commented on June 5, 2024

from facial-expression-recognition.pytorch.

imKeith avatar imKeith commented on June 5, 2024

解决了
怎么实现的

把util换成作者发的那个

from facial-expression-recognition.pytorch.

imKeith avatar imKeith commented on June 5, 2024

是不是改过utils.py?
把改过的utils.py换成作者发的那个就OK了

from facial-expression-recognition.pytorch.

xurui123456 avatar xurui123456 commented on June 5, 2024

你有遇到过fer文件的图像处理问题嘛

from facial-expression-recognition.pytorch.

xurui123456 avatar xurui123456 commented on June 5, 2024

是不是改过utils.py? 把改过的utils.py换成作者发的那个就OK了

你有遇到过fer文件的图像处理问题嘛

from facial-expression-recognition.pytorch.

imKeith avatar imKeith commented on June 5, 2024

可以把问题发过来看一下吗?

from facial-expression-recognition.pytorch.

xurui123456 avatar xurui123456 commented on June 5, 2024

可以把问题发过来看一下吗?

img = img[:, :, np.newaxis]
img = np.concatenate((img, img, img), axis=2)
img = Image.fromarray(img)
# print(type(img))
if self.transform is not None:
img = self.transform(img)
fer文件里的总是报错TypeError: pic should be PIL Image or ndarray. Got <class ‘torch.Tensor‘>

from facial-expression-recognition.pytorch.

imKeith avatar imKeith commented on June 5, 2024

可以把问题发过来看一下吗?

img = img[:, :, np.newaxis] img = np.concatenate((img, img, img), axis=2) img = Image.fromarray(img) # print(type(img)) if self.transform is not None: img = self.transform(img) fer文件里的总是报错TypeError: pic should be PIL Image or ndarray. Got <class ‘torch.Tensor‘>

我没有遇到过这种错误。
个人感觉可能需要检查transform中是否存在两次ToTensor()方法,检查transform中每一个操作的数据类型变化

from facial-expression-recognition.pytorch.

imKeith avatar imKeith commented on June 5, 2024

可以把问题发过来看一下吗?

img = img[:, :, np.newaxis] img = np.concatenate((img, img, img), axis=2) img = Image.fromarray(img) # print(type(img)) if self.transform is not None: img = self.transform(img) fer文件里的总是报错TypeError: pic should be PIL Image or ndarray. Got <class ‘torch.Tensor‘>

我没有遇到过这种错误。 个人感觉可能需要检查transform中是否存在两次ToTensor()方法,检查transform中每一个操作的数据类型变化

CSDN上有一个pytorch常见问题,我也是从这里面看到的

from facial-expression-recognition.pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.